diff --git a/alib2std/src/extensions/allocFix.hpp b/alib2std/src/extensions/allocFix.hpp index 48159d494637c083a92312ff6aa7d7511c4a77c8..8ded1be51514b4a458fe1125911f3bb286315ca7 100644 --- a/alib2std/src/extensions/allocFix.hpp +++ b/alib2std/src/extensions/allocFix.hpp @@ -46,6 +46,7 @@ public: AllocFix ( ) { // just to make sure the allocator constructor exists static Alloc alloc; + (void) alloc; // make unused variable warning go away } }; diff --git a/alib2std/src/extensions/container/map.hpp b/alib2std/src/extensions/container/map.hpp index e82cbe55616751dfb0257e92e51b19db74c84606..15ef799f606d4d24b67596586bdc060923da4a41 100644 --- a/alib2std/src/extensions/container/map.hpp +++ b/alib2std/src/extensions/container/map.hpp @@ -289,8 +289,8 @@ public: */ template < class K > auto equal_range ( K && key ) const & { - auto range = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); - return ext::iterator_range < decltype ( range.first ) > ( range.first, range.second ); + auto res = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); + return ext::iterator_range < decltype ( res.first ) > ( res.first, res.second ); } /** @@ -305,8 +305,8 @@ public: */ template < class K > auto equal_range ( K && key ) & { - auto range = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); - return ext::iterator_range < decltype ( range.first ) > ( range.first, range.second ); + auto res = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); + return ext::iterator_range < decltype ( res.first ) > ( res.first, res.second ); } /** @@ -321,8 +321,8 @@ public: */ template < class K > auto equal_range ( K && key ) && { - auto range = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); - return ext::make_iterator_range ( make_map_move_iterator < T, R > ( range.first ), make_map_move_iterator < T, R > ( range.second ) ); + auto res = std::map < T, R, Cmp, Alloc >::equal_range ( std::forward < K > ( key ) ); + return ext::make_iterator_range ( make_map_move_iterator < T, R > ( res.first ), make_map_move_iterator < T, R > ( res.second ) ); } }; diff --git a/alib2std/src/extensions/container/string.hpp b/alib2std/src/extensions/container/string.hpp index f6ed43a37e5520bea2bd1a8ce9f007d045e4c3ae..52e7df994e9572aa6ea0ead8b9bbb3cf57a7ac38 100644 --- a/alib2std/src/extensions/container/string.hpp +++ b/alib2std/src/extensions/container/string.hpp @@ -411,8 +411,8 @@ inline bool not_isspace ( int ch ) { * \return string without spaces at front of it */ inline void ltrim ( std::string & s ) { - auto end = std::find_if ( s.begin ( ), s.end ( ), not_isspace ); - s.erase ( s.begin ( ), end ); + auto endPos = std::find_if ( s.begin ( ), s.end ( ), not_isspace ); + s.erase ( s.begin ( ), endPos ); } /** @@ -424,8 +424,8 @@ inline void ltrim ( std::string & s ) { * \return string without spaces at back of it */ inline void rtrim ( std::string & s ) { - auto begin = std::find_if ( s.rbegin ( ), s.rend ( ), not_isspace ).base ( ); - s.erase ( begin, s.end ( ) ); + auto beginPos = std::find_if ( s.rbegin ( ), s.rend ( ), not_isspace ).base ( ); + s.erase ( beginPos, s.end ( ) ); } /**