Problem: code style issues in options_t (C-style cast, suboptimal std::string::find call, redundant method is_valid)

Solution: resolved these issues
This commit is contained in:
Simon Giesecke
2018-05-30 13:13:31 +02:00
parent a96a87f343
commit bd76926f5b
3 changed files with 19 additions and 26 deletions

View File

@@ -364,11 +364,6 @@ int zmq::socket_base_t::setsockopt (int option_,
{
scoped_optional_lock_t sync_lock (_thread_safe ? &_sync : NULL);
if (!options.is_valid (option_)) {
errno = EINVAL;
return -1;
}
if (unlikely (_ctx_terminated)) {
errno = ETERM;
return -1;