summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-16 16:14:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-16 23:05:34 +0200
commit433ab39b2175bdadb4916373cd2dc8e1aabc08a5 (patch)
tree8a108185efadbd9615ab69598b3c435badaa39a2 /l10ntools
parentcb636701881df38f3092d499142acbf62f4eff3c (diff)
Adapt implicit OString return value construction to C++23 P2266R1
With the recent implementation of <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html> "P2266R1: Simpler implicit move" in Clang 13 trunk as <https://github.com/llvm/llvm-project/commit/bf20631782183cd19e0bb7219e908c2bbb01a75f> "[clang] Implement P2266 Simpler implicit move", a --with-latest-c++ build started to fail with > comphelper/source/xml/xmltools.cxx:103:20: error: no viable conversion from returned value of type 'char [39]' to function return type 'rtl::OString' > return str; > ^~~ [...] > include/rtl/string.hxx:277:5: note: candidate constructor [with T = char [39]] not viable: expects an lvalue for 1st argument > OString( T& value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type = libreoffice_internal::Dummy() ) > ^ [...] etc. Change-Id: If34f143a1855fdd7cd22ea3d7594f9381d50a7ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117336 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/po.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 8d47a7d39410..2c0b4f88b254 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -427,7 +427,7 @@ OString PoEntry::genKeyId(const OString& rGenerator)
nCRC >>= 6;
}
sKeyId[5] = '\0';
- return sKeyId;
+ return OString(sKeyId);
}
namespace
@@ -439,7 +439,7 @@ namespace
struct tm* pNow = localtime(&aNow);
char pBuff[50];
strftime( pBuff, sizeof pBuff, "%Y-%m-%d %H:%M%z", pNow );
- return pBuff;
+ return OString(pBuff);
}
}