diff options
Diffstat (limited to 'number.cpp')
-rw-r--r-- | number.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -2,9 +2,18 @@ #include <sstream> #include "number.h" -number::number(std::uint32_t n): - _operands{n} -{ } +number::number(std::uint64_t n) +{ + if (n == 0) { + return; + } + + _operands.push_back(n & UINT32_MAX); + + if (n > UINT32_MAX) { + _operands.push_back(n >> 32); + } +} /* Type Conversion {{{ */ |