diff --git a/src/common/HashSet.h b/src/common/HashSet.h index 4e454e9978..61a7fb2310 100644 --- a/src/common/HashSet.h +++ b/src/common/HashSet.h @@ -30,11 +30,11 @@ template class HashSet typedef typename Super::iterator iterator; typedef typename Super::const_iterator const_iterator; - HashSet() + HashSet() { } - HashSet( const std::initializer_list &initializerList ) + HashSet( const std::initializer_list &initializerList ) : _container( initializerList ) { } @@ -44,35 +44,35 @@ template class HashSet _container.insert( value ); } - void insert( const HashSet &other ) + void insert( const HashSet &other ) { for ( auto it = other.begin(); it != other.end(); ++it ) _container.insert( *it ); } - void operator+=( const HashSet &other ) + void operator+=( const HashSet &other ) { insert( other ); } - HashSet operator+( const HashSet &other ) + HashSet operator+( const HashSet &other ) { - HashSet result = *this; + HashSet result = *this; result.insert( other ); return result; } - bool operator==( const HashSet &other ) const + bool operator==( const HashSet &other ) const { return _container == other._container; } - bool operator!=( const HashSet &other ) const + bool operator!=( const HashSet &other ) const { return _container != other._container; } - bool operator<( const HashSet &other ) const + bool operator<( const HashSet &other ) const { return _container < other._container; } diff --git a/src/common/List.h b/src/common/List.h index 1111d6b6c4..a808831892 100644 --- a/src/common/List.h +++ b/src/common/List.h @@ -31,27 +31,27 @@ template class List typedef typename Super::reverse_iterator reverse_iterator; typedef typename Super::const_reverse_iterator const_reverse_iterator; - List() + List() { } - List( const std::initializer_list &initializerList ) + List( const std::initializer_list &initializerList ) : _container( initializerList ) { } - List( unsigned size, T value ) + List( unsigned size, T value ) : _container( size, value ) { } template - List( InputIt begin, InputIt end ) + List( InputIt begin, InputIt end ) : _container( begin, end ) { } - void append( const List &other ) + void append( const List &other ) { for ( const auto &element : other ) _container.push_back( element ); @@ -67,7 +67,7 @@ template class List _container.push_front( value ); } - void appendHead( const List &other ) + void appendHead( const List &other ) { _container.insert( begin(), other.begin(), other.end() ); } @@ -188,12 +188,12 @@ template class List _container.remove_if( p ); } - bool operator==( const List &other ) const + bool operator==( const List &other ) const { return _container == other._container; } - bool operator!=( const List &other ) const + bool operator!=( const List &other ) const { return _container != other._container; } diff --git a/src/common/Set.h b/src/common/Set.h index 9c3950f3e1..65da071f25 100644 --- a/src/common/Set.h +++ b/src/common/Set.h @@ -36,11 +36,11 @@ template class Set typedef typename Super::const_iterator const_iterator; typedef typename Super::const_reverse_iterator const_reverse_iterator; - Set() + Set() { } - Set( const std::initializer_list &initializerList ) + Set( const std::initializer_list &initializerList ) : _container( initializerList ) { } @@ -50,7 +50,7 @@ template class Set _container.insert( value ); } - void insert( const Set &other ) + void insert( const Set &other ) { for ( auto it = other.begin(); it != other.end(); ++it ) _container.insert( *it ); @@ -62,43 +62,43 @@ template class Set _container.insert( *it ); } - void operator+=( const Set &other ) + void operator+=( const Set &other ) { insert( other ); } - Set operator+( const Set &other ) + Set operator+( const Set &other ) { - Set result = *this; + Set result = *this; result.insert( other ); return result; } - bool operator==( const Set &other ) const + bool operator==( const Set &other ) const { return _container == other._container; } - bool operator!=( const Set &other ) const + bool operator!=( const Set &other ) const { return _container != other._container; } - bool operator<( const Set &other ) const + bool operator<( const Set &other ) const { return _container < other._container; } - static bool containedIn( const Set &one, const Set &two ) + static bool containedIn( const Set &one, const Set &two ) // Is one contained in two? { - return Set::difference( one, two ).empty(); + return Set::difference( one, two ).empty(); } - static Set difference( const Set &one, const Set &two ) + static Set difference( const Set &one, const Set &two ) // Elements that appear in one, but do not appear in two. { - Set difference; + Set difference; std::set_difference( one.begin(), one.end(), two.begin(), @@ -107,9 +107,9 @@ template class Set return difference; } - static Set intersection( const Set &one, const Set &two ) + static Set intersection( const Set &one, const Set &two ) { - Set intersection; + Set intersection; std::set_intersection( one.begin(), one.end(), two.begin(), diff --git a/src/common/Vector.h b/src/common/Vector.h index 91f4f72c68..d683731e47 100644 --- a/src/common/Vector.h +++ b/src/common/Vector.h @@ -33,29 +33,29 @@ template class Vector typedef typename Super::const_reverse_iterator const_reverse_iterator; - Vector() + Vector() { } - Vector( const Vector &rhs ) = default; + Vector( const Vector &rhs ) = default; - Vector( const std::initializer_list &initializerList ) + Vector( const std::initializer_list &initializerList ) : _container( initializerList ) { } - Vector( unsigned size ) + Vector( unsigned size ) : _container( size ) { } - Vector( unsigned size, T value ) + Vector( unsigned size, T value ) : _container( size, value ) { } template - Vector( InputIt begin, InputIt end ) + Vector( InputIt begin, InputIt end ) : _container( begin, end ) { } @@ -238,9 +238,9 @@ template class Vector std::shuffle( _container.begin(), _container.end(), g ); } - Vector operator+( const Vector &other ) + Vector operator+( const Vector &other ) { - Vector output; + Vector output; for ( unsigned i = 0; i < this->size(); ++i ) output.append( ( *this )[i] ); @@ -251,7 +251,7 @@ template class Vector return output; } - Vector &operator+=( const Vector &other ) + Vector &operator+=( const Vector &other ) { ( *this ) = ( *this ) + other; return *this; @@ -293,12 +293,12 @@ template class Vector return value; } - bool operator==( const Vector &other ) const + bool operator==( const Vector &other ) const { if ( size() != other.size() ) return false; - Vector copyOfOther = other; + Vector copyOfOther = other; for ( unsigned i = 0; i < size(); ++i ) { @@ -311,12 +311,12 @@ template class Vector return true; } - bool operator!=( const Vector &other ) const + bool operator!=( const Vector &other ) const { return !( *this == other ); } - Vector &operator=( const Vector &other ) + Vector &operator=( const Vector &other ) { _container = other._container; return *this;