[Libreoffice-commits] core.git: include/rtl
Michael Stahl
mstahl at redhat.com
Fri Feb 6 02:38:08 PST 2015
include/rtl/strbuf.hxx | 2 ++
include/rtl/ustrbuf.hxx | 2 ++
2 files changed, 4 insertions(+)
New commits:
commit d4cd001e3117b989fbfa7a650d7f4e4dc1877795
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Feb 6 11:31:54 2015 +0100
sal: add back the append / insert assertions that were...
...removed in 2c03d6fb053319e61ed600a3c22c4fd39da84e4d.
Change-Id: I09194c55ac574bbc0f3065360b329fab8f0ba10c
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 43d0eaf..b2ad147 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -473,6 +473,7 @@ public:
*/
OStringBuffer & append( const sal_Char * str, sal_Int32 len)
{
+ assert( len == 0 || str != 0 ); // cannot assert that in rtl_stringbuffer_insert
rtl_stringbuffer_insert( &pData, &nCapacity, getLength(), str, len );
return *this;
}
@@ -731,6 +732,7 @@ public:
*/
OStringBuffer & insert( sal_Int32 offset, const sal_Char * str, sal_Int32 len)
{
+ assert( len == 0 || str != 0 ); // cannot assert that in rtl_stringbuffer_insert
rtl_stringbuffer_insert( &pData, &nCapacity, offset, str, len );
return *this;
}
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 5ae2334..179ba82 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -457,6 +457,7 @@ public:
*/
OUStringBuffer & append( const sal_Unicode * str, sal_Int32 len)
{
+ assert( len == 0 || str != 0 ); // cannot assert that in rtl_uStringbuffer_insert
rtl_uStringbuffer_insert( &pData, &nCapacity, getLength(), str, len );
return *this;
}
@@ -798,6 +799,7 @@ public:
*/
OUStringBuffer & insert( sal_Int32 offset, const sal_Unicode * str, sal_Int32 len)
{
+ assert( len == 0 || str != 0 ); // cannot assert that in rtl_uStringbuffer_insert
rtl_uStringbuffer_insert( &pData, &nCapacity, offset, str, len );
return *this;
}
More information about the Libreoffice-commits
mailing list