diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-03-28 21:33:11 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-03-28 23:00:53 +0200 |
commit | 81e7364f52b6135776d4999be287524d508a7d08 (patch) | |
tree | 0fd03aa32200b1c8d7e29708aa071b6cf364af4f /sal/inc/rtl/ustrbuf.hxx | |
parent | 48cd6ac1ec7e92a9c9a21f5365db4f9ff5fde93c (diff) |
move string helper types to stringutils.hxx
Diffstat (limited to 'sal/inc/rtl/ustrbuf.hxx')
-rw-r--r-- | sal/inc/rtl/ustrbuf.hxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx index adb17616ac7a..15bbe67ad04b 100644 --- a/sal/inc/rtl/ustrbuf.hxx +++ b/sal/inc/rtl/ustrbuf.hxx @@ -36,10 +36,28 @@ #include <osl/diagnose.h> #include <rtl/ustrbuf.h> #include <rtl/ustring.hxx> +#include <rtl/stringutils.hxx> + +// The unittest uses slightly different code to help check that the proper +// calls are made. The class is put into a different namespace to make +// sure the compiler generates a different (if generating also non-inline) +// copy of the function and does not merge them together. The class +// is "brought" into the proper rtl namespace by a typedef below. +#ifdef RTL_STRING_UNITTEST +#define rtl rtlunittest +#endif namespace rtl { +#ifdef RTL_STRING_UNITTEST +#undef rtl +// helper macro to make functions appear more readable +#define RTL_STRING_CONST_FUNCTION rtl_string_unittest_const_literal_function = true; +#else +#define RTL_STRING_CONST_FUNCTION +#endif + /** A string buffer implements a mutable sequence of characters. <p> String buffers are safe for use by multiple threads. The methods @@ -866,6 +884,14 @@ private: } +#ifdef RTL_STRING_UNITTEST +namespace rtl +{ +typedef rtlunittest::OUStringBuffer OUStringBuffer; +} +#undef RTL_STRING_CONST_FUNCTION +#endif + #endif /* _RTL_USTRBUF_HXX_ */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |