mirror of
https://github.com/AxioDL/jbus.git
synced 2025-12-14 07:36:07 +00:00
General: Make operator bool overloads and single-arg constructors explicit
Prevents various error-prone cases of implicit conversion to bool, while retaining general conversions within conditional statements. We also disable implicit conversions with constructors that may be ambiguous to enforce being clear with intentions.
This commit is contained in:
@@ -43,8 +43,8 @@ void Listener::listenerProc() {
|
||||
}
|
||||
|
||||
/* We use blocking I/O since we have a dedicated transfer thread */
|
||||
net::Socket acceptData = {true};
|
||||
net::Socket acceptClock = {true};
|
||||
net::Socket acceptData{true};
|
||||
net::Socket acceptClock{true};
|
||||
std::string hostname;
|
||||
while (m_running) {
|
||||
if (m_dataServer.accept(acceptData, hostname) == net::Socket::EResult::OK) {
|
||||
|
||||
Reference in New Issue
Block a user