From 9d3cb71115cfb34adde975f66f394303982f85be Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 9 Nov 2015 12:22:17 +0100 Subject: Prevent += called on temporary O[U]String instances ...found regression e31205f3ec1f941ab5a188bfde6329edf2acc55b "EditUndoRemoveChars::GetStr must return a reference" and dubious code 0e23f7b0839df68d277186b4df54ba391ac3406a "Lets assume this doesn't want to update m_pForcedPrefix->GetText() anyway" in addition to the apparent sillies directly fixed in this commit. Introduces HAVE_CXX11_REF_QUALIFIER. Change-Id: I564e98254fd53c1dd9b34193d7057c59721ee24c --- sal/qa/rtl/strings/test_oustring_concat.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sal') diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx index 977229691702..3bc69e17cfe8 100644 --- a/sal/qa/rtl/strings/test_oustring_concat.cxx +++ b/sal/qa/rtl/strings/test_oustring_concat.cxx @@ -75,8 +75,14 @@ void test::oustring::StringConcat::checkConcat() void test::oustring::StringConcat::checkConcatAsciiL() { - CPPUNIT_ASSERT_EQUAL(OUString("foo"), OUString("foo") += ""); - CPPUNIT_ASSERT_EQUAL(OUString("foobar"), OUString("foo") += "bar"); + { + OUString s("foo"); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), s += ""); + } + { + OUString s("foo"); + CPPUNIT_ASSERT_EQUAL(OUString("foobar"), s += "bar"); + } } void test::oustring::StringConcat::checkEnsureCapacity() -- cgit