[Libreoffice-commits] core.git: include/rtl
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 26 10:34:52 UTC 2020
include/rtl/stringutils.hxx | 6 +++---
include/rtl/ustrbuf.hxx | 4 +++-
include/rtl/ustring.hxx | 4 +++-
3 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 4382d36ffd38f2481f83e59fd11ead8d62e08a39
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 25 20:52:05 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 26 12:34:15 2020 +0200
Except[Const]CharArrayDetector is only used by RTL_STRING_UNITTEST
...which in turn should be a LIBO_INTERNAL_ONLY feature, so confine all relevant
declarations accordingly
Change-Id: I7545eadad6f097d0ee905583b1610631c92f1858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101373
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index b968845465ce..40b03c84f4bb 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -272,6 +272,8 @@ template<typename T> struct ConstCharArrayDetector<
};
#endif
+#if defined LIBO_INTERNAL_ONLY && defined RTL_STRING_UNITTEST
+
// this one is used to rule out only const char[N]
template< typename T >
struct ExceptConstCharArrayDetector
@@ -282,14 +284,12 @@ template< int N >
struct ExceptConstCharArrayDetector< const char[ N ] >
{
};
-#if defined LIBO_INTERNAL_ONLY
template<std::size_t N>
struct ExceptConstCharArrayDetector<sal_Unicode const[N]> {};
template<> struct ExceptConstCharArrayDetector<
OUStringChar
>
{};
-#endif
// this one is used to rule out only const char[N]
// (const will be brought in by 'const T&' in the function call)
@@ -308,10 +308,10 @@ template< int N >
struct ExceptCharArrayDetector< const char[ N ] >
{
};
-#if defined LIBO_INTERNAL_ONLY
template<std::size_t N> struct ExceptCharArrayDetector<sal_Unicode[N]> {};
template<std::size_t N> struct ExceptCharArrayDetector<sal_Unicode const[N]> {};
template<> struct ExceptCharArrayDetector<OUStringChar_> {};
+
#endif
template< typename T1, typename T2 = void >
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index dcd228e9eea8..2d957d81064e 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -181,7 +181,8 @@ public:
}
#endif
-#ifdef RTL_STRING_UNITTEST
+#if defined LIBO_INTERNAL_ONLY && defined RTL_STRING_UNITTEST
+ /// @cond INTERNAL
/**
* Only used by unittests to detect incorrect conversions.
* @internal
@@ -206,6 +207,7 @@ public:
rtl_uString_newFromLiteral( &pData, "!!br0ken!!", 10, 0 ); // set to garbage
rtl_string_unittest_invalid_conversion = true;
}
+ /// @endcond
#endif
#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index d86602e9f2e3..d73977192cd0 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -290,7 +290,8 @@ public:
}
#endif
-#ifdef RTL_STRING_UNITTEST
+#if defined LIBO_INTERNAL_ONLY && defined RTL_STRING_UNITTEST
+ /// @cond INTERNAL
/**
* Only used by unittests to detect incorrect conversions.
* @internal
@@ -313,6 +314,7 @@ public:
rtl_uString_newFromLiteral( &pData, "!!br0ken!!", 10, 0 ); // set to garbage
rtl_string_unittest_invalid_conversion = true;
}
+ /// @endcond
#endif
#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
More information about the Libreoffice-commits
mailing list