Skip to content

Commit

Permalink
Socket::operator=: Return non-const reference
Browse files Browse the repository at this point in the history
Found by cppcheck.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk authored and keithw committed Mar 10, 2013
1 parent d0eeabb commit 866e139
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/network/network.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/network/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 866e139

Please sign in to comment.