From c9cb051fae190acfc36813e4a23759fb9b9c3df3 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 16 Nov 2020 12:48:44 +0100 Subject: Implement hierarchical evaluation (WIP) --- asm/operators.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'asm/operators.cpp') 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 operator+(std::vector a, const std::vector& b) { +std::vector operator+(std::vector a, const std::vector& b) +{ a.insert(a.end(), b.begin(), b.end()); return a; } -std::vector operator+(std::vector a, const uint8_t& b) { +std::vector operator+(std::vector a, const uint8_t& b) +{ a.push_back(b); return a; } +std::vector operator+=(std::vector& a, const std::vector& b) +{ + a.insert(a.end(), b.begin(), b.end()); + return a; +} + +std::vector operator+=(std::vector& a, const uint8_t& b) +{ + a.push_back(b); + return a; +} -- cgit v1.2.3