summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/class.h8
-rw-r--r--include/exception.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/include/class.h b/include/class.h
index 371595e..26cc610 100644
--- a/include/class.h
+++ b/include/class.h
@@ -462,7 +462,7 @@ private:
T *obj = (T *)base;
// retrieve the casted value and convert it if necessary
- auto result = obj->__toString();
+ Value result{ obj->__toString() };
result.setType(Type::String);
// return the converted result
@@ -480,7 +480,7 @@ private:
T *obj = (T *)base;
// retrieve the casted value and convert it if necessary
- auto result = obj->__toInteger();
+ Value result{ obj->__toInteger() };
result.setType(Type::Numeric);
// return the converted result
@@ -498,7 +498,7 @@ private:
T *obj = (T *)base;
// retrieve the casted value and convert it if necessary
- auto result = obj->__toFloat();
+ Value result{ obj->__toFloat() };
result.setType(Type::Float);
// return the converted result
@@ -516,7 +516,7 @@ private:
T *obj = (T *)base;
// retrieve the casted value and convert it if necessary
- auto result = obj->__toBool();
+ Value result{ obj->__toBool() };
result.setType(Type::Bool);
// return the converted result
diff --git a/include/exception.h b/include/exception.h
index 55601c2..235529f 100644
--- a/include/exception.h
+++ b/include/exception.h
@@ -41,12 +41,12 @@ public:
* Constructor
* @param &string
*/
- Exception(const std::string &message, int code = 0) : std::exception(), _message(message), _code(code) {}
+ Exception(std::string message, int code = 0) : std::exception(), _message(std::move(message)), _code(code) {}
/**
* Destructor
*/
- virtual ~Exception() throw() {}
+ virtual ~Exception() = default;
/**
* Overridden what method