diff options
Diffstat (limited to 'Swiften/Base')
-rw-r--r-- | Swiften/Base/SafeByteArray.h | 4 | ||||
-rw-r--r-- | Swiften/Base/SafeString.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/Base/SafeByteArray.h b/Swiften/Base/SafeByteArray.h index c80a2c0..1ef850f 100644 --- a/Swiften/Base/SafeByteArray.h +++ b/Swiften/Base/SafeByteArray.h @@ -34,6 +34,10 @@ namespace Swift { return SafeByteArray(c, c + n); } + inline SafeByteArray createSafeByteArray(const unsigned char* c, size_t n) { + return SafeByteArray(c, c + n); + } + SafeByteArray createSafeByteArray(const SafeString& s); } diff --git a/Swiften/Base/SafeString.h b/Swiften/Base/SafeString.h index 0bd898d..44b0316 100644 --- a/Swiften/Base/SafeString.h +++ b/Swiften/Base/SafeString.h @@ -59,6 +59,10 @@ namespace Swift { return data.size(); } + bool operator==(const SafeString& o) const { + return data == o.data; + } + private: std::vector<char, SafeAllocator<char> > data; }; |