mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
Fixed 7 MSVC2008 Compiler Warning (level 3) C4800: 'const int' : forcing value to bool 'true' or 'false' (performance warning)
- added explicit test "(xxx != 0)" to get a "bool" value out of the "int" expression - see the MSDN recommandation http://msdn.microsoft.com/en-us/library/b6801kcy(v=vs.90).aspx
This commit is contained in:
@@ -88,14 +88,14 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
|
||||
return -1;
|
||||
}
|
||||
if (option_ == ZMQ_ROUTER_RAW) {
|
||||
raw_sock = *static_cast <const int*> (optval_);
|
||||
raw_sock = (*static_cast <const int*> (optval_) != 0);
|
||||
if (raw_sock) {
|
||||
options.recv_identity = false;
|
||||
options.raw_sock = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
mandatory = *static_cast <const int*> (optval_);
|
||||
mandatory = (*static_cast <const int*> (optval_) != 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user