summaryrefslogtreecommitdiffhomepage
path: root/asm/operators.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'asm/operators.cpp')
-rw-r--r--asm/operators.cpp17
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;
+}