diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-16 12:48:44 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-16 12:48:44 +0100 |
commit | c9cb051fae190acfc36813e4a23759fb9b9c3df3 (patch) | |
tree | fcd8c93cd5dc2a3272eac253b0291611e16ea13f /asm/operators.cpp | |
parent | 300219dc8519720a36525c7b40c6a327580fe0bd (diff) |
Implement hierarchical evaluation (WIP)
Diffstat (limited to 'asm/operators.cpp')
-rw-r--r-- | asm/operators.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/asm/operators.cpp b/asm/operators.cpp index 9f7d5d9..9cd02a1 100644 --- a/asm/operators.cpp +++ b/asm/operators.cpp @@ -1,13 +1,26 @@ #include "operators.h" // binary code operators -std::vector<uint8_t> operator+(std::vector<uint8_t> a, const std::vector<uint8_t>& b) { +std::vector<uint8_t> operator+(std::vector<uint8_t> a, const std::vector<uint8_t>& b) +{ a.insert(a.end(), b.begin(), b.end()); return a; } -std::vector<uint8_t> operator+(std::vector<uint8_t> a, const uint8_t& b) { +std::vector<uint8_t> operator+(std::vector<uint8_t> a, const uint8_t& b) +{ a.push_back(b); return a; } +std::vector<uint8_t> operator+=(std::vector<uint8_t>& a, const std::vector<uint8_t>& b) +{ + a.insert(a.end(), b.begin(), b.end()); + return a; +} + +std::vector<uint8_t> operator+=(std::vector<uint8_t>& a, const uint8_t& b) +{ + a.push_back(b); + return a; +} |