diff --git a/alib2common/src/container/ObjectsDeque.h b/alib2common/src/container/ObjectsDeque.h index 21282ec7d95d85b216611085196fa5c125251d10..2eca9e9fac237ed8f66afbee27d6f1cbce4fd238 100644 --- a/alib2common/src/container/ObjectsDeque.h +++ b/alib2common/src/container/ObjectsDeque.h @@ -83,12 +83,12 @@ template < class ElementType > int ObjectsDeque < ElementType >::compare ( const ObjectsDeque & other ) const { std::compare < std::deque < ElementType > > comp; - return comp ( static_cast < const std::deque < ElementType > > ( * this ), static_cast < const std::deque < ElementType > > ( other ) ); + return comp ( static_cast < const std::deque < ElementType > & > ( * this ), static_cast < const std::deque < ElementType > & > ( other ) ); } template < class ElementType > void ObjectsDeque < ElementType >::operator >>( std::ostream & os ) const { - os << "(ObjectsDeque " << static_cast < const std::deque < ElementType > > ( * this ) << ")"; + os << "(ObjectsDeque " << static_cast < const std::deque < ElementType > & > ( * this ) << ")"; } template < class ElementType > diff --git a/alib2common/src/container/ObjectsList.h b/alib2common/src/container/ObjectsList.h index 2cc8d3f47e5ec177dce161075c0429b4ee810e66..fc42141fcf3d77dd08fa66a59795662595313184 100644 --- a/alib2common/src/container/ObjectsList.h +++ b/alib2common/src/container/ObjectsList.h @@ -83,12 +83,12 @@ template < class ElementType > int ObjectsList < ElementType >::compare ( const ObjectsList & other ) const { std::compare < std::list < ElementType > > comp; - return comp ( static_cast < const std::list < ElementType > > ( * this ), static_cast < const std::list < ElementType > > ( other ) ); + return comp ( static_cast < const std::list < ElementType > & > ( * this ), static_cast < const std::list < ElementType > & > ( other ) ); } template < class ElementType > void ObjectsList < ElementType >::operator >>( std::ostream & os ) const { - os << "(ObjectsList " << static_cast < const std::list < ElementType > > ( * this ) << ")"; + os << "(ObjectsList " << static_cast < const std::list < ElementType > & > ( * this ) << ")"; } template < class ElementType > diff --git a/alib2common/src/container/ObjectsMap.h b/alib2common/src/container/ObjectsMap.h index c65ae1c4c09443708b1fba64d01d8bb4f443968f..bd4b7da3217f7b4977baf5d5d5b4cd4bac012959 100644 --- a/alib2common/src/container/ObjectsMap.h +++ b/alib2common/src/container/ObjectsMap.h @@ -86,12 +86,12 @@ ContainerBase* ObjectsMap<KeyType, ValueType>::plunder() && { template < class KeyType, class ValueType > int ObjectsMap<KeyType, ValueType>::compare(const ObjectsMap& other) const { std::compare<std::map<KeyType, ValueType>> comp; - return comp(static_cast<const std::map<KeyType, ValueType>>(*this), static_cast<const std::map<KeyType, ValueType>>(other)); + return comp ( static_cast < const std::map < KeyType, ValueType > & > ( * this ), static_cast < const std::map < KeyType, ValueType > & > ( other ) ); } template < class KeyType, class ValueType > void ObjectsMap<KeyType, ValueType>::operator>>(std::ostream& os) const { - os << "(ObjectsMap " << static_cast<const std::map<KeyType, ValueType>>(*this) << ")"; + os << "(ObjectsMap " << static_cast < const std::map < KeyType, ValueType > & > ( * this ) << ")"; } template < class KeyType, class ValueType > diff --git a/alib2common/src/container/ObjectsPair.h b/alib2common/src/container/ObjectsPair.h index df35115e50e1aa59749741120fb87e7cda5633f5..bf1147d2e5e7179410cb6ef161a21992ab96f139 100644 --- a/alib2common/src/container/ObjectsPair.h +++ b/alib2common/src/container/ObjectsPair.h @@ -84,12 +84,12 @@ ContainerBase* ObjectsPair < FirstType, SecondType >::plunder() && { template < class FirstType, class SecondType > int ObjectsPair < FirstType, SecondType >::compare(const ObjectsPair& other) const { std::compare<std::pair<FirstType, SecondType>> comp; - return comp(static_cast<const std::pair<FirstType, SecondType>>(*this), static_cast<const std::pair<FirstType, SecondType>>(other)); + return comp ( static_cast < const std::pair < FirstType, SecondType > & > ( * this ), static_cast < const std::pair < FirstType, SecondType > & > ( other ) ); } template < class FirstType, class SecondType > void ObjectsPair < FirstType, SecondType >::operator>>(std::ostream& os) const { - os << "(ObjectsPair " << static_cast<const std::pair<FirstType, SecondType>>(*this) << ")"; + os << "(ObjectsPair " << static_cast < const std::pair < FirstType, SecondType > & > ( * this ) << ")"; } template < class FirstType, class SecondType > diff --git a/alib2common/src/container/ObjectsSet.h b/alib2common/src/container/ObjectsSet.h index 8a91eb6cefb96bad74acf33b6a5f32cf93db278a..7c3bbcbf748144f4a8a83bd88cde377f072b1e30 100644 --- a/alib2common/src/container/ObjectsSet.h +++ b/alib2common/src/container/ObjectsSet.h @@ -84,12 +84,12 @@ ContainerBase* ObjectsSet < ElementType >::plunder() && { template < class ElementType > int ObjectsSet < ElementType >::compare(const ObjectsSet& other) const { std::compare<std::set<ElementType>> comp; - return comp(static_cast<const std::set<ElementType>>(*this), static_cast<const std::set<ElementType>>(other)); + return comp ( static_cast < const std::set < ElementType > & > ( * this ), static_cast < const std::set < ElementType > & > ( other ) ); } template < class ElementType > void ObjectsSet < ElementType >::operator>>(std::ostream& os) const { - os << "(ObjectsSet " << static_cast<const std::set<ElementType>>(*this) << ")"; + os << "(ObjectsSet " << static_cast < const std::set < ElementType > & > ( * this ) << ")"; } template < class ElementType > diff --git a/alib2common/src/container/ObjectsTree.h b/alib2common/src/container/ObjectsTree.h index a520ec9090746fd7cd0c4c502df531aecf4410e3..3924bb08fd432250c130d7df872b4eb8de629d43 100644 --- a/alib2common/src/container/ObjectsTree.h +++ b/alib2common/src/container/ObjectsTree.h @@ -78,12 +78,12 @@ template < class ElementType > int ObjectsTree < ElementType >::compare ( const ObjectsTree & other ) const { std::compare < std::tree < ElementType > > comp; - return comp ( static_cast < const std::tree < ElementType > > ( * this ), static_cast < const std::tree < ElementType > > ( other ) ); + return comp ( static_cast < const std::tree < ElementType > & > ( * this ), static_cast < const std::tree < ElementType > & > ( other ) ); } template < class ElementType > void ObjectsTree < ElementType >::operator >>( std::ostream & os ) const { - os << "(ObjectsTree " << static_cast < const std::tree < ElementType > > ( * this ) << ")"; + os << "(ObjectsTree " << static_cast < const std::tree < ElementType > & > ( * this ) << ")"; } template < class ElementType > diff --git a/alib2common/src/container/ObjectsVector.h b/alib2common/src/container/ObjectsVector.h index 514343d0102208e22acbfd7990f7f7979ba77117..b46844f94a2b8627207d06d1074d56b08f69e0ed 100644 --- a/alib2common/src/container/ObjectsVector.h +++ b/alib2common/src/container/ObjectsVector.h @@ -83,12 +83,12 @@ template < class ElementType > int ObjectsVector < ElementType >::compare ( const ObjectsVector & other ) const { std::compare < std::vector < ElementType > > comp; - return comp ( static_cast < const std::vector < ElementType > > ( * this ), static_cast < const std::vector < ElementType > > ( other ) ); + return comp ( static_cast < const std::vector < ElementType > & > ( * this ), static_cast < const std::vector < ElementType > & > ( other ) ); } template < class ElementType > void ObjectsVector < ElementType >::operator >>( std::ostream & os ) const { - os << "(ObjectsVector " << static_cast < const std::vector < ElementType > > ( * this ) << ")"; + os << "(ObjectsVector " << static_cast < const std::vector < ElementType > & > ( * this ) << ")"; } template < class ElementType >