From: g0dil Date: Tue, 8 Sep 2009 13:52:10 +0000 (+0000) Subject: Packets: Take value arguments of container parser push_back and push_front by const... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8170f9bdf8fae3d9f16b20e04bdea7770280ccf0;p=senf.git Packets: Take value arguments of container parser push_back and push_front by const & and not by value git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1404 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/ListParser.cti b/senf/Packets/ListParser.cti index 286c325..e8c85a7 100644 --- a/senf/Packets/ListParser.cti +++ b/senf/Packets/ListParser.cti @@ -84,7 +84,7 @@ senf::ListParser::front() template template -prefix_ void senf::ListParser::push_back(Value value, size_type n) +prefix_ void senf::ListParser::push_back(Value const & value, size_type n) const { container c(*this); @@ -101,7 +101,7 @@ prefix_ void senf::ListParser::push_back_space(size_type n) template template -prefix_ void senf::ListParser::push_front(Value value, size_type n) +prefix_ void senf::ListParser::push_front(Value const & value, size_type n) const { container c(*this); @@ -301,7 +301,7 @@ prefix_ void senf::ListParser_Container::erase(iterator f, iterator template template -prefix_ void senf::ListParser_Container::push_back(Value value, +prefix_ void senf::ListParser_Container::push_back(Value const & value, size_type n) { insert(end(),n,value); @@ -315,7 +315,7 @@ prefix_ void senf::ListParser_Container::push_back_space(size_type n template template -prefix_ void senf::ListParser_Container::push_front(Value value, +prefix_ void senf::ListParser_Container::push_front(Value const & value, size_type n) { insert(begin(),n,value); diff --git a/senf/Packets/ListParser.hh b/senf/Packets/ListParser.hh index 7986f36..3b26dad 100644 --- a/senf/Packets/ListParser.hh +++ b/senf/Packets/ListParser.hh @@ -101,9 +101,9 @@ namespace senf { value_type front() const; value_type back() const; - template void push_back (Value value, size_type n=1) const; + template void push_back (Value const & value, size_type n=1) const; void push_back_space (size_type n=1) const; - template void push_front (Value value, size_type n=1) const; + template void push_front (Value const & value, size_type n=1) const; void push_front_space (size_type n=1) const; void resize (size_type n) const; template void resize (size_type n, Value value) const; @@ -200,9 +200,9 @@ namespace senf { void erase(iterator f, iterator l); void clear(); - template void push_back (Value value, size_type n=1); + template void push_back (Value const & value, size_type n=1); void push_back_space (size_type n=1); - template void push_front (Value value, size_type n=1); + template void push_front (Value const & value, size_type n=1); void push_front_space (size_type n=1); void resize (size_type n); template void resize (size_type n, Value value); diff --git a/senf/Packets/VectorParser.cti b/senf/Packets/VectorParser.cti index 60a7924..de4a3ac 100644 --- a/senf/Packets/VectorParser.cti +++ b/senf/Packets/VectorParser.cti @@ -113,7 +113,7 @@ senf::VectorParser::back() template template -prefix_ void senf::VectorParser::push_back(Value value, size_type n) +prefix_ void senf::VectorParser::push_back(Value const & value, size_type n) const { container c (*this); @@ -130,7 +130,7 @@ prefix_ void senf::VectorParser::push_back_space(size_t template template -prefix_ void senf::VectorParser::push_front(Value value, size_type n) +prefix_ void senf::VectorParser::push_front(Value const & value, size_type n) const { container c (*this); @@ -265,8 +265,8 @@ prefix_ void senf::VectorParser_Container::clear() template template -prefix_ void senf::VectorParser_Container::push_back(Value value, - size_type n) +prefix_ void senf::VectorParser_Container::push_back(Value const & value, + size_type n) { insert(end(),n,value); } @@ -279,8 +279,8 @@ prefix_ void senf::VectorParser_Container::push_back_sp template template -prefix_ void senf::VectorParser_Container::push_front(Value value, - size_type n) +prefix_ void senf::VectorParser_Container::push_front(Value const & value, + size_type n) { insert(begin(),n,value); } diff --git a/senf/Packets/VectorParser.hh b/senf/Packets/VectorParser.hh index 12c599b..ef3fe36 100644 --- a/senf/Packets/VectorParser.hh +++ b/senf/Packets/VectorParser.hh @@ -106,9 +106,9 @@ namespace senf { // If you need to pass an iterator it is much simpler and cleaner to use the // 'container' wrapper - template void push_back (Value value, size_type n=1) const; + template void push_back (Value const & value, size_type n=1) const; void push_back_space (size_type n=1) const; - template void push_front (Value value, size_type n=1) const; + template void push_front (Value const & value, size_type n=1) const; void push_front_space (size_type n=1) const; void resize (size_type n) const; template void resize (size_type n, Value value) const; @@ -202,9 +202,9 @@ namespace senf { void erase(iterator f, iterator l); void clear(); - template void push_back (Value value, size_type n=1); + template void push_back (Value const & value, size_type n=1); void push_back_space (size_type n=1); - template void push_front (Value value, size_type n=1); + template void push_front (Value const & value, size_type n=1); void push_front_space (size_type n=1); void resize (size_type n); template void resize (size_type n, Value value);