diff --git a/alib2common/src/primitive/String.cpp b/alib2common/src/primitive/String.cpp index 4733ae5d8f1c2cf71b88abf7b4389bb62c7e0734..cac9c55b72049d911a45b301557e083243c9ec07 100644 --- a/alib2common/src/primitive/String.cpp +++ b/alib2common/src/primitive/String.cpp @@ -68,7 +68,7 @@ void String::compose(ext::deque<sax::Token>& out) const { compose(out, this->getData()); } -void String::compose(ext::deque<sax::Token>& out, std::string primitive) { +void String::compose(ext::deque<sax::Token>& out, const std::string & primitive) { out.emplace_back(primitive::String::getXmlTagName(), sax::Token::TokenType::START_ELEMENT); out.emplace_back(primitive, sax::Token::TokenType::CHARACTER); out.emplace_back(primitive::String::getXmlTagName(), sax::Token::TokenType::END_ELEMENT); @@ -95,7 +95,7 @@ std::string xmlApi<std::string>::xmlTagName() { return primitive::String::getXmlTagName(); } -void xmlApi<std::string>::compose(ext::deque<sax::Token>& output, std::string data) { +void xmlApi<std::string>::compose(ext::deque<sax::Token>& output, const std::string & data) { primitive::String::compose(output, data); } diff --git a/alib2common/src/primitive/String.h b/alib2common/src/primitive/String.h index 06a188734eb577cae50c4e77705356d0e1946ce1..87f7a52d5bf48cc19de5f62083aaaf4aa9f922f3 100644 --- a/alib2common/src/primitive/String.h +++ b/alib2common/src/primitive/String.h @@ -66,7 +66,7 @@ public: static std::string parseRaw ( ext::deque < sax::Token >::iterator & input ); void compose ( ext::deque < sax::Token > & out ) const; - static void compose ( ext::deque < sax::Token > & out, std::string primitive ); + static void compose ( ext::deque < sax::Token > & out, const std::string & primitive ); virtual PrimitiveBase * inc ( ) &&; @@ -86,7 +86,7 @@ struct xmlApi < std::string > { static std::string parse ( ext::deque < sax::Token >::iterator & input ); static bool first ( const ext::deque < sax::Token >::const_iterator & input ); static std::string xmlTagName ( ); - static void compose ( ext::deque < sax::Token > & output, std::string data ); + static void compose ( ext::deque < sax::Token > & output, const std::string & data ); }; } /* namespace alib */