summaryrefslogtreecommitdiffhomepage
path: root/asm/operators.cpp
blob: 9cd02a1917b4a5a344e682bd1c983376c2dc1a45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "operators.h"

// binary code operators
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;
}

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;
}