diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-06 19:42:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-06 21:52:26 +0100 |
commit | 36a1484f72e4da7211349d20f9b3c78e311df9f6 (patch) | |
tree | f381a2dac49ea4a5ef67def60fd05062a820b64b /external/cppunit | |
parent | a8b20ca2fe7054e699cf0ff48889e54cee4dd4fd (diff) |
cid#1546421 COPY_INSTEAD_OF_MOVE
Change-Id: Ifab2f2f5ec8c7f41cd705e0fb07d1273a34b879d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161724
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'external/cppunit')
-rw-r--r-- | external/cppunit/0001-cid-1546460-COPY_INSTEAD_OF_MOVE.patch.1 | 59 |
1 files changed, 59 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 2ca04d5ebb6e..742dce907bcc 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,6 +44,65 @@ index 585c3da..be02385 100644 , m_content() , m_attributes() , m_elements() +@@ -74,15 +74,15 @@ XmlElement::setContent( int numericContent ) + + + void +-XmlElement::addAttribute( std::string attributeName, +- std::string value ) ++XmlElement::addAttribute( const std::string& attributeName, ++ const std::string& value ) + { + m_attributes.push_back( Attribute( attributeName, value ) ); + } + + + void +-XmlElement::addAttribute( std::string attributeName, ++XmlElement::addAttribute( const std::string& attributeName, + int numericValue ) + { + addAttribute( attributeName, StringTools::toString( numericValue ) ); +@@ -194,7 +194,7 @@ XmlElement::attributesAsString() const + + + std::string +-XmlElement::escape( std::string value ) const ++XmlElement::escape( const std::string& value ) const + { + std::string escaped; + for ( unsigned int index =0; index < value.length(); ++index ) +diff --git a/include/cppunit/tools/XmlElement.h b/include/cppunit/tools/XmlElement.h +index 3478a35..d033aa2 100644 +--- a/include/cppunit/tools/XmlElement.h ++++ b/include/cppunit/tools/XmlElement.h +@@ -79,14 +79,14 @@ public: + * \param attributeName Name of the attribute. Must not be an empty. + * \param value Value of the attribute. + */ +- void addAttribute( std::string attributeName, +- std::string value ); ++ void addAttribute( const std::string& attributeName, ++ const std::string& value ); + + /*! \brief Adds an attribute with the specified numeric value. + * \param attributeName Name of the attribute. Must not be empty. + * \param numericValue Numeric value of the attribute. + */ +- void addAttribute( std::string attributeName, ++ void addAttribute( const std::string& attributeName, + int numericValue ); + + /*! \brief Adds a child element to the element. +@@ -125,7 +125,7 @@ private: + typedef std::pair<std::string,std::string> Attribute; + + std::string attributesAsString() const; +- std::string escape( std::string value ) const; ++ std::string escape( const std::string& value ) const; + + private: + std::string m_name; diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h index ca65593..2010739 100644 --- a/include/cppunit/Asserter.h |