diff options
author | randomdan <randomdan@localhost> | 2013-04-09 19:14:11 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2013-04-09 19:14:11 +0000 |
commit | eb157b6313f24b24c53c20593dcfcb2421a2b29d (patch) | |
tree | c963eb27ae9d111854fb07a18659996a3877418e /project2/common/variableConvert.cpp | |
parent | GCC 4.6 workaround for vector of objects with consts (diff) | |
download | project2-eb157b6313f24b24c53c20593dcfcb2421a2b29d.tar.bz2 project2-eb157b6313f24b24c53c20593dcfcb2421a2b29d.tar.xz project2-eb157b6313f24b24c53c20593dcfcb2421a2b29d.zip |
Address ambiguity converting to long int on 32bit
Diffstat (limited to 'project2/common/variableConvert.cpp')
-rw-r--r-- | project2/common/variableConvert.cpp | 12 |
1 files changed, 8 insertions, 4 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 { |