summaryrefslogtreecommitdiff
path: root/number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'number.cpp')
-rw-r--r--number.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/number.cpp b/number.cpp
index 497cf64..fa62b00 100644
--- a/number.cpp
+++ b/number.cpp
@@ -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 {{{ */