summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-06 19:27:23 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-06 21:52:18 +0100
commita8b20ca2fe7054e699cf0ff48889e54cee4dd4fd (patch)
treeb18cca254bc3860308f423e167bff72a13717e14
parent3871cca6122701135b42dc8687364835ed14fdf5 (diff)
cid#1545475 COPY_INSTEAD_OF_MOVE
and cid#1545626 COPY_INSTEAD_OF_MOVE cid#1546203 COPY_INSTEAD_OF_MOVE Change-Id: I98a6c36e77fe633d50fdb1a0f063b2656f852a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161718 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.168
1 files changed, 68 insertions, 0 deletions
diff --git a/external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.1 b/external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.1
index 640d04ad5684..2ca04d5ebb6e 100644
--- a/external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.1
+++ b/external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.1
@@ -44,5 +44,73 @@ index 585c3da..be02385 100644
, m_content()
, m_attributes()
, m_elements()
+diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
+index ca65593..2010739 100644
+--- a/include/cppunit/Asserter.h
++++ b/include/cppunit/Asserter.h
+@@ -159,11 +159,11 @@
+ * what are the differences between the expected and actual value.
+ * \param shortDescription Short description for the failure message.
+ */
+- [[noreturn]] static void CPPUNIT_API failNotEqual( std::string expected,
+- std::string actual,
++ [[noreturn]] static void CPPUNIT_API failNotEqual( const std::string& expected,
++ const std::string& actual,
+ const SourceLine &sourceLine,
+ const AdditionalMessage &additionalMessage = AdditionalMessage(),
+- std::string shortDescription = "equality assertion failed" );
++ const std::string& shortDescription = "equality assertion failed" );
+
+ /*! \brief Throws an Exception with the specified message and location.
+ * \param expected Text describing the expected value.
+@@ -231,11 +231,11 @@
+ * \param shortDescription Short description for the failure message.
+ */
+ static void CPPUNIT_API failNotEqualIf( bool shouldFail,
+- std::string expected,
+- std::string actual,
++ const std::string& expected,
++ const std::string& actual,
+ const SourceLine &sourceLine,
+ const AdditionalMessage &additionalMessage = AdditionalMessage(),
+- std::string shortDescription = "equality assertion failed" );
++ const std::string& shortDescription = "equality assertion failed" );
+
+ };
+
+diff --git a/src/cppunit/Asserter.cpp b/src/cppunit/Asserter.cpp
+index 52f8625..fe2097e 100644
+--- a/src/cppunit/Asserter.cpp
++++ b/src/cppunit/Asserter.cpp
+@@ -110,11 +110,11 @@
+
+
+ void
+-Asserter::failNotEqual( std::string expected,
+- std::string actual,
++Asserter::failNotEqual( const std::string& expected,
++ const std::string& actual,
+ const SourceLine &sourceLine,
+ const AdditionalMessage &additionalMessage,
+- std::string shortDescription )
++ const std::string& shortDescription )
+ {
+ fail( makeMessage( makeExpectedEqual(expected),
+ makeActual(actual),
+@@ -182,11 +182,11 @@
+ }
+ void
+ Asserter::failNotEqualIf( bool shouldFail,
+- std::string expected,
+- std::string actual,
++ const std::string& expected,
++ const std::string& actual,
+ const SourceLine &sourceLine,
+ const AdditionalMessage &additionalMessage,
+- std::string shortDescription )
++ const std::string& shortDescription )
+ {
+ if ( shouldFail )
+ failNotEqual( expected, actual, sourceLine, additionalMessage, shortDescription );
--
2.43.0