summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-25 20:52:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-26 12:34:15 +0200
commit4382d36ffd38f2481f83e59fd11ead8d62e08a39 (patch)
tree2ddfe26d9f498af9e7b9ece0865430617ec15ef7 /include/rtl
parent4f6551d24279aab31b23f4dd668f42d6e3d15348 (diff)
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@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/stringutils.hxx6
-rw-r--r--include/rtl/ustrbuf.hxx4
-rw-r--r--include/rtl/ustring.hxx4
3 files changed, 9 insertions, 5 deletions
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"