[Libreoffice-commits] core.git: include/rtl
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 11 20:18:46 UTC 2019
include/rtl/string.hxx | 12 ++----------
include/rtl/ustring.hxx | 16 ++++------------
2 files changed, 6 insertions(+), 22 deletions(-)
New commits:
commit f5a6a44187c703514490789c949d67753f113a69
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Oct 11 17:15:29 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Oct 11 22:17:39 2019 +0200
Revert "Use constexpr if in const char array ctors"
This reverts commit fbbbc7e3f9a62a80d41bcf9621cc098fd45b94c7.
See discussion at https://gerrit.libreoffice.org/80637.
Change-Id: Ie3e5c73a0bd727e226ffb84e813c5b90e0e288d4
Reviewed-on: https://gerrit.libreoffice.org/80664
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index c9ea3c6752c0..a7a04f9d06e4 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -210,11 +210,7 @@ public:
assert(
libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
pData = NULL;
- if
-#if defined LIBO_INTERNAL_ONLY
- constexpr
-#endif
- (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_string_new(&pData);
} else {
rtl_string_newFromLiteral(
@@ -348,11 +344,7 @@ public:
RTL_STRING_CONST_FUNCTION
assert(
libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
- if
-#if defined LIBO_INTERNAL_ONLY
- constexpr
-#endif
- (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_string_new(&pData);
} else {
rtl_string_newFromLiteral(
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index b63c61e677ce..a974e3ac7a12 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -257,11 +257,7 @@ public:
assert(
libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
pData = NULL;
- if
-#if defined LIBO_INTERNAL_ONLY
- constexpr
-#endif
- (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_uString_new(&pData);
} else {
rtl_uString_newFromLiteral(
@@ -284,7 +280,7 @@ public:
= libreoffice_internal::Dummy()):
pData(nullptr)
{
- if constexpr (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_uString_new(&pData);
} else {
rtl_uString_newFromStr_WithLength(
@@ -503,11 +499,7 @@ public:
{
assert(
libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
- if
-#if defined LIBO_INTERNAL_ONLY
- constexpr
-#endif
- (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_uString_new(&pData);
} else {
rtl_uString_newFromLiteral(
@@ -525,7 +517,7 @@ public:
typename
libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
operator =(T & literal) {
- if constexpr (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
+ if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) {
rtl_uString_new(&pData);
} else {
rtl_uString_newFromStr_WithLength(
More information about the Libreoffice-commits
mailing list