diff options
Diffstat (limited to 'cpp/test/Ice/custom/StringView.h')
-rw-r--r-- | cpp/test/Ice/custom/StringView.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/test/Ice/custom/StringView.h b/cpp/test/Ice/custom/StringView.h index f970f642b0d..b78fae1a06e 100644 --- a/cpp/test/Ice/custom/StringView.h +++ b/cpp/test/Ice/custom/StringView.h @@ -28,7 +28,7 @@ public: _data(0), _size(0) {} - + string_view(const string_view& sv) : _data(sv._data), _size(sv._size) @@ -71,7 +71,7 @@ public: { return _size != 0; } - + const char* data() const { return _data; @@ -85,7 +85,7 @@ public: std::string to_string() const { - return std::string(_data, _size); + return std::string(_data, _size); } int compare(string_view str) const @@ -110,19 +110,19 @@ public: return 1; } } - + private: const char* _data; size_t _size; }; -inline bool +inline bool operator==(string_view lhs, string_view rhs) { return lhs.compare(rhs) == 0; } -inline bool +inline bool operator!=(string_view lhs, string_view rhs) { return lhs.compare(rhs) != 0; @@ -163,7 +163,7 @@ struct StreamHelper<Util::string_view, StreamHelperCategoryBuiltin> #endif } - template<class S> static inline void + template<class S> static inline void read(S* stream, Util::string_view& v) { const char* vdata = 0; |