summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-14 11:11:08 +0100
committerGitHub <noreply@github.com>2020-12-14 11:11:08 +0100
commitd76df1a2741457a5cd723bedd5919ed342ece2e7 (patch)
treeadc85df9d64daeb5c55a921978f673d37215ff6b /ACE/ace
parent262c6a58da02c4fb1a0174db483c3ed65ce53e63 (diff)
parenta43a79e4dd01f75d80fa2262741c641212c5ceaa (diff)
downloadATCD-d76df1a2741457a5cd723bedd5919ed342ece2e7.tar.gz
Merge pull request #1345 from jwillemsen/jwi-simplifyboolean
Simplify boolean expressions
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/Event_Handler.cpp6
-rw-r--r--ACE/ace/Recursive_Thread_Mutex.cpp2
-rw-r--r--ACE/ace/Thread_Manager.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/ACE/ace/Event_Handler.cpp b/ACE/ace/Event_Handler.cpp
index 0a2bb21f52b..4b016b0b1bc 100644
--- a/ACE/ace/Event_Handler.cpp
+++ b/ACE/ace/Event_Handler.cpp
@@ -354,19 +354,19 @@ ACE_Event_Handler_var::reset (ACE_Event_Handler *p)
ACE_Event_Handler_var::operator bool() const
{
- return this->ptr_ == nullptr ? false : true;
+ return this->ptr_ != nullptr;
}
bool
ACE_Event_Handler_var::operator ==(std::nullptr_t) const
{
- return this->ptr_ == nullptr ? true : false;
+ return this->ptr_ == nullptr;
}
bool
ACE_Event_Handler_var::operator !=(std::nullptr_t) const
{
- return this->ptr_ == nullptr ? false : true;
+ return this->ptr_ != nullptr;
}
diff --git a/ACE/ace/Recursive_Thread_Mutex.cpp b/ACE/ace/Recursive_Thread_Mutex.cpp
index 9642f40f505..047a334a24b 100644
--- a/ACE/ace/Recursive_Thread_Mutex.cpp
+++ b/ACE/ace/Recursive_Thread_Mutex.cpp
@@ -47,7 +47,7 @@ ACE_Recursive_Thread_Mutex::remove ()
{
// ACE_TRACE ("ACE_Recursive_Thread_Mutex::remove");
int result = 0;
- if (this->removed_ == false)
+ if (!this->removed_)
{
this->removed_ = true;
result = ACE_OS::recursive_mutex_destroy (&this->lock_);
diff --git a/ACE/ace/Thread_Manager.cpp b/ACE/ace/Thread_Manager.cpp
index e5434960e02..4b7042c1216 100644
--- a/ACE/ace/Thread_Manager.cpp
+++ b/ACE/ace/Thread_Manager.cpp
@@ -1717,7 +1717,7 @@ ACE_Thread_Manager::wait (const ACE_Time_Value *timeout,
ACE_Auto_Ptr<ACE_Time_Value> local_timeout;
// Check to see if we're using absolute time or not.
- if (use_absolute_time == false && timeout != 0)
+ if (!use_absolute_time && timeout != 0)
{
// create time value duplicate (preserves time policy)
local_timeout.reset (timeout->duplicate ());