diff options
Diffstat (limited to 'Swiften/Base/ByteArray.h')
| -rw-r--r-- | Swiften/Base/ByteArray.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Base/ByteArray.h b/Swiften/Base/ByteArray.h index ea96d09..ab256a4 100644 --- a/Swiften/Base/ByteArray.h +++ b/Swiften/Base/ByteArray.h @@ -53,12 +53,19 @@ namespace Swift { friend ByteArray operator+(const ByteArray& a, const ByteArray&b) { ByteArray result(a); result.data_.insert(result.data_.end(), b.data_.begin(), b.data_.end()); return result; } + friend ByteArray operator+(const ByteArray& a, char b) { + ByteArray x; + x.resize(1); + x[0] = b; + return a + x; + } + ByteArray& operator+=(const ByteArray& b) { data_.insert(data_.end(), b.data_.begin(), b.data_.end()); return *this; } friend bool operator==(const ByteArray& a, const ByteArray& b) { |
Swift