diff options
author | Peter Powell <petpow@saberuk.com> | 2018-12-12 20:34:46 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-12-12 21:43:24 +0000 |
commit | 0f7cfd46ef2d277f5f82e34a2852c75212d75261 (patch) | |
tree | 73445b54ad2ce50ae75999ec9f939ff1097b057a /src/base.cpp | |
parent | 4e0cb28c1913c4ef76dd06b04fe321afe310f232 (diff) |
Fix conversion issues by replacing ConvToInt with ConvToNum<T>.
The former was a thin wrapper around atol and brought with it all
of the weird parsing logic of atol which is almost never what is
actually wanted. It also almost never returned the numeric type
which is actually wanted which can cause weird issues when casting.
Diffstat (limited to 'src/base.cpp')
-rw-r--r-- | src/base.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base.cpp b/src/base.cpp index f698bad2e..8749aee8e 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -278,7 +278,7 @@ std::string LocalIntExt::serialize(SerializeFormat format, const Extensible* con void LocalIntExt::unserialize(SerializeFormat format, Extensible* container, const std::string& value) { if (format != FORMAT_NETWORK) - set(container, ConvToInt(value)); + set(container, ConvToNum<intptr_t>(value)); } intptr_t LocalIntExt::get(const Extensible* container) const |