diff -ruN claw-orig/claw/impl/avl_base.tpp claw/claw/impl/avl_base.tpp --- a/claw/impl/avl_base.tpp +++ b/claw/impl/avl_base.tpp @@ -1082,7 +1082,7 @@ typename claw::avl_base::iterator claw::avl_base::find( const K& key ) { - return make_iterator( m_tree->find(key) ); + return make_iterator( m_tree ? m_tree->find(key) : NULL ); } // avl_base::find() /*----------------------------------------------------------------------------*/ @@ -1094,7 +1094,7 @@ typename claw::avl_base::const_iterator claw::avl_base::find( const K& key ) const { - return make_const_iterator( m_tree->find(key) ); + return make_const_iterator( m_tree ? m_tree->find(key) : NULL ); } // avl_base::find() /*----------------------------------------------------------------------------*/ @@ -1107,7 +1107,7 @@ typename claw::avl_base::iterator claw::avl_base::find_nearest_greater( const K& key ) { - return make_iterator( m_tree->find_nearest_greater(key) ); + return make_iterator( m_tree ? m_tree->find_nearest_greater(key) : NULL ); } // avl_base::find_nearest_greater() /*----------------------------------------------------------------------------*/ @@ -1120,7 +1120,7 @@ typename claw::avl_base::const_iterator claw::avl_base::find_nearest_greater( const K& key ) const { - return make_const_iterator( m_tree->find_nearest_greater(key) ); + return make_const_iterator( m_tree ? m_tree->find_nearest_greater(key) : NULL ); } // avl_base::find_nearest_greater() /*----------------------------------------------------------------------------*/ @@ -1133,7 +1133,7 @@ typename claw::avl_base::iterator claw::avl_base::find_nearest_lower( const K& key ) { - return make_iterator( m_tree->find_nearest_lower(key) ); + return make_iterator( m_tree ? m_tree->find_nearest_lower(key) : NULL ); } // avl_base::find_nearest_lower() /*----------------------------------------------------------------------------*/ @@ -1146,7 +1146,7 @@ typename claw::avl_base::const_iterator claw::avl_base::find_nearest_lower( const K& key ) const { - return make_const_iterator( m_tree->find_nearest_lower(key) ); + return make_const_iterator( m_tree ? m_tree->find_nearest_lower(key) : NULL ); } // avl_base::find_nearest_lower() /*----------------------------------------------------------------------------*/ @@ -1156,7 +1156,7 @@ template typename claw::avl_base::iterator claw::avl_base::lower_bound() { - return make_iterator( m_tree->lower_bound() ); + return make_iterator( m_tree ? m_tree->lower_bound() : NULL ); } // avl_base::lower_bound() /*----------------------------------------------------------------------------*/ @@ -1167,7 +1167,7 @@ typename claw::avl_base::const_iterator claw::avl_base::lower_bound() const { - return make_const_iterator( m_tree->lower_bound() ); + return make_const_iterator( m_tree ? m_tree->lower_bound() : NULL ); } // avl_base::lower_bound() /*----------------------------------------------------------------------------*/ @@ -1177,7 +1177,7 @@ template typename claw::avl_base::iterator claw::avl_base::upper_bound() { - return make_iterator( m_tree->upper_bound() ); + return make_iterator( m_tree ? m_tree->upper_bound() : NULL ); } // avl_base::upper_bound() /*----------------------------------------------------------------------------*/ @@ -1188,7 +1188,7 @@ typename claw::avl_base::const_iterator claw::avl_base::upper_bound() const { - return make_const_iterator( m_tree->upper_bound() ); + return make_const_iterator( m_tree ? m_tree->upper_bound() : NULL ); } // avl_base::upper_bound() /*----------------------------------------------------------------------------*/ diff -ruN claw-orig/claw/impl/socket_stream.tpp claw/claw/impl/socket_stream.tpp --- a/claw/impl/socket_stream.tpp +++ b/claw/impl/socket_stream.tpp @@ -37,7 +37,7 @@ template claw::net::basic_socket_stream::basic_socket_stream ( int read_delay ) - : m_buffer(read_delay) + : std::basic_iostream(nullptr), m_buffer(read_delay) { this->init(&m_buffer); } // basic_socket_stream::basic_socket_stream() @@ -53,7 +53,7 @@ template claw::net::basic_socket_stream::basic_socket_stream ( const char* address, int port, int read_delay ) - : m_buffer(read_delay) + : std::basic_iostream(nullptr), m_buffer(read_delay) { this->init(&m_buffer); open(address, port); diff -ruN claw-orig/claw/it_index.hpp claw/claw/it_index.hpp --- a/claw/it_index.hpp +++ b/claw/it_index.hpp @@ -143,7 +143,7 @@ it_index operator++(int) { it_index r(*this); - ++(this); + ++(*this); return r; } @@ -159,7 +159,7 @@ it_index operator--(int) { it_index r(*this); - --(this); + --(*this); return r; }