diff options
-rw-r--r-- | project2/common/variableConvert.cpp | 12 | ||||
-rw-r--r-- | project2/common/variableType.h | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/project2/common/variableConvert.cpp b/project2/common/variableConvert.cpp index 8fd906f..69082de 100644 --- a/project2/common/variableConvert.cpp +++ b/project2/common/variableConvert.cpp @@ -173,13 +173,17 @@ VariableType::operator const unsigned char *() const { return reinterpret_cast<const unsigned char *>(boost::apply_visitor(ConvertVisitorCharStar(this), *this)); } -VariableType::operator int32_t() const +VariableType::operator int() const { - return boost::apply_visitor(ConvertVisitor<int32_t>(this), *this); + return boost::apply_visitor(ConvertVisitor<int>(this), *this); } -VariableType::operator int64_t() const +VariableType::operator long int() const { - return boost::apply_visitor(ConvertVisitor<int64_t>(this), *this); + return boost::apply_visitor(ConvertVisitor<long int>(this), *this); +} +VariableType::operator long long int() const +{ + return boost::apply_visitor(ConvertVisitor<long long int>(this), *this); } VariableType::operator double() const { diff --git a/project2/common/variableType.h b/project2/common/variableType.h index 21c2c39..d3ac5a0 100644 --- a/project2/common/variableType.h +++ b/project2/common/variableType.h @@ -87,8 +87,9 @@ class VariableType : public _VT { operator const std::string &() const; operator const char *() const; operator const unsigned char *() const; - operator int64_t() const; - operator int32_t() const; + operator long long int() const; + operator long int() const; + operator int() const; operator double() const; operator const boost::posix_time::ptime &() const; template <typename T> operator boost::optional<T>() const { return isNull() ? boost::optional<T>() : as<T>(); } |