Skip to content

Commit

Permalink
Mark operator bool as explicit
Browse files Browse the repository at this point in the history
    * ACE/protocols/ace/INet/HTTPS_Context.h:
    * ACE/protocols/ace/INet/HTTP_Status.h:
    * ACE/protocols/ace/INet/URLBase.cpp:
    * ACE/protocols/ace/INet/URLBase.h:
    * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Dynamic_Bitset.h:
  • Loading branch information
jwillemsen committed Jul 31, 2024
1 parent e69db0c commit 9b4704f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ACE/protocols/ace/INet/HTTPS_Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace ACE

~Context ();

operator bool () const;
explicit operator bool () const;

bool operator ! () const;
explicit bool operator ! () const;

ACE_SSL_Context& ssl_context ();

Expand Down
4 changes: 2 additions & 2 deletions ACE/protocols/ace/INet/HTTP_Status.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ namespace ACE
bool is_ok () const;

/// Return true in case of a *valid* HTTP status
operator bool () const;
explicit operator bool () const;

/// Return true if status code == INVALID
bool operator !() const;
explicit bool operator !() const;

/// Returns an appropriate reason phrase
static const ACE_CString& get_reason(Code status);
Expand Down
2 changes: 1 addition & 1 deletion ACE/protocols/ace/INet/URLBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace ACE
return this->request_handler_ == 0 || !this->request_handler_->is_response_ok ();
}

URLStream::operator bool ()
explicit URLStream::operator bool ()
{
return this->request_handler_ != 0 && this->request_handler_->is_response_ok ();
}
Expand Down
4 changes: 2 additions & 2 deletions ACE/protocols/ace/INet/URLBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ namespace ACE
URLStream (const URLStream& url_stream);
~URLStream ();

bool operator ! ();
explicit bool operator ! ();

operator bool ();
explicit operator bool ();

std::istream& operator * ();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Dynamic_Bitset
typedef unsigned size_type;
reference(Dynamic_Bitset* bitset, size_type bit);
reference operator = (bool val);
operator bool () const;
explicit operator bool () const;
private:
Dynamic_Bitset* bitset_;
size_type bit_;
Expand Down

0 comments on commit 9b4704f

Please sign in to comment.