Permalink
Browse files

Socket::operator=: Return non-const reference

Found by cppcheck.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information...
1 parent d0eeabb commit 866e1399d5286d93d65012556a92769288a19928 @andersk andersk committed with keithw Feb 18, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/network/network.cc
  2. +1 −1 src/network/network.h
@@ -586,7 +586,7 @@ Connection::Socket::Socket( const Socket & other )
}
}
-const Connection::Socket & Connection::Socket::operator=( const Socket & other )
+Connection::Socket & Connection::Socket::operator=( const Socket & other )
{
_fd = dup( other._fd );
@@ -114,7 +114,7 @@ namespace Network {
~Socket();
Socket( const Socket & other );
- const Socket & operator=( const Socket & other );
+ Socket & operator=( const Socket & other );
};
std::deque< Socket > socks;

0 comments on commit 866e139

Please sign in to comment.