diff options
author | Noel <noel.grandin@collabora.co.uk> | 2020-12-18 11:20:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-18 11:50:55 +0100 |
commit | ccb3fed37d849a88c74594c44f2aec68c808a33f (patch) | |
tree | cac9d5006ff25868261bd12a3ad2c89e4d961570 /include/rtl | |
parent | vcl: move nShift closer into scope where it is used (diff) | |
download | core-ccb3fed37d849a88c74594c44f2aec68c808a33f.tar.gz core-ccb3fed37d849a88c74594c44f2aec68c808a33f.zip |
add OStringBuffer::append(std::string_view)
so we don't need to construct an OString when appending from a view
Change-Id: I8105d916b43215e312857e9d9d00a38c3d833861
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107938
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/strbuf.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 074d1278ea86..2f2df8624f25 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -30,6 +30,7 @@ #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" #include "rtl/stringconcat.hxx" +#include <string_view> #endif #ifdef RTL_STRING_UNITTEST @@ -585,6 +586,15 @@ public: return append( c.buf, c.length ); } + /** + @overload + @internal + */ + OStringBuffer& append( std::string_view s ) + { + return append( s.data(), s.size() ); + } + #endif /** |