Commit 27f68c38ef604a74cfcb7e9ed9e43a1c446fd0b5
Committed by
Moritz Wirger
1 parent
8d2b067e
Make SocketCloser ctor explicit to avoid accidental construction
Showing
1 changed file
with
1 additions
and
1 deletions
hueplusplus/LinHttpHandler.cpp
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | 36 | ||
| 37 | class SocketCloser { | 37 | class SocketCloser { |
| 38 | public: | 38 | public: |
| 39 | - SocketCloser(int sockFd) : s(sockFd) {} | 39 | + explicit SocketCloser(int sockFd) : s(sockFd) {} |
| 40 | ~SocketCloser() { close(s); } | 40 | ~SocketCloser() { close(s); } |
| 41 | private: | 41 | private: |
| 42 | int s; | 42 | int s; |