diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-10 11:09:24 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-11 15:05:41 +0200 |
commit | f5d02bdc6831588c0442fa24c5913971a224c4fa (patch) | |
tree | 759600927f16f2056034a598dfe61936c9dd3bc0 /include/rtl/strbuf.hxx | |
parent | 312e752ca5f32d774ecbe8f7d997805e8608ad73 (diff) |
Forward constarray-handling append/insert code to basic methods
so that we only have small number of places where to track capacity change
(I need that to try to analyze where the reallocations happen most often)
Change-Id: I077d5ebab845cb7e1deaac363d46e1fb2dbbb0c7
Reviewed-on: https://gerrit.libreoffice.org/80593
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/rtl/strbuf.hxx')
-rw-r--r-- | include/rtl/strbuf.hxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 832c48959d47..afead770298d 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -531,11 +531,9 @@ public: RTL_STRING_CONST_FUNCTION assert( libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal)); - rtl_stringbuffer_insert( - &pData, &nCapacity, getLength(), + return append( libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal), libreoffice_internal::ConstCharArrayDetector<T>::length); - return *this; } /** @@ -801,11 +799,10 @@ public: RTL_STRING_CONST_FUNCTION assert( libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal)); - rtl_stringbuffer_insert( - &pData, &nCapacity, offset, + return insert( + offset, libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal), libreoffice_internal::ConstCharArrayDetector<T>::length); - return *this; } /** |