diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-09-10 13:58:10 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-09-10 13:58:10 +0000 |
commit | 354d8e76c64df981920aaa76613824c857b9a1b0 (patch) | |
tree | c53206b6e6e9296e97dde5b1479281dde8ec60eb | |
parent | d58108a50579ce3860f48714e1c6fd922de2dfe9 (diff) | |
download | ATCD-354d8e76c64df981920aaa76613824c857b9a1b0.tar.gz |
Mon Sep 10 13:57:27 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/DLL.h:
* ace/DLL.cpp:
* ace/DLL_Manager.h:
* ace/DLL_Manager.cpp:
Use bool for become_owner
-rw-r--r-- | ACE/ChangeLog | 8 | ||||
-rw-r--r-- | ACE/ace/DLL.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/DLL.h | 5 | ||||
-rw-r--r-- | ACE/ace/DLL_Manager.cpp | 10 | ||||
-rw-r--r-- | ACE/ace/DLL_Manager.h | 6 |
5 files changed, 19 insertions, 12 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 97d156d6578..2e94235db0c 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,11 @@ +Mon Sep 10 13:57:27 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/DLL.h: + * ace/DLL.cpp: + * ace/DLL_Manager.h: + * ace/DLL_Manager.cpp: + Use bool for become_owner + Mon Sep 10 00:16:29 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * bin/diff-builds-and-group-fixed-tests-only.sh: diff --git a/ACE/ace/DLL.cpp b/ACE/ace/DLL.cpp index f5b3a5edc6e..fc7e65c980d 100644 --- a/ACE/ace/DLL.cpp +++ b/ACE/ace/DLL.cpp @@ -235,7 +235,7 @@ ACE_DLL::error (void) const // means the user temporarily wants to take the handle. ACE_SHLIB_HANDLE -ACE_DLL::get_handle (int become_owner) const +ACE_DLL::get_handle (bool become_owner) const { ACE_TRACE ("ACE_DLL::get_handle"); diff --git a/ACE/ace/DLL.h b/ACE/ace/DLL.h index 6a5c0073974..167c4b46e0c 100644 --- a/ACE/ace/DLL.h +++ b/ACE/ace/DLL.h @@ -161,12 +161,12 @@ public: ACE_TCHAR *error (void) const; /** - * Return the handle to the caller. If @a become_owner is non-0 then + * Return the handle to the caller. If @a become_owner is true then * caller assumes ownership of the handle and the ACE_DLL object * won't call close() when it goes out of scope, even if * @c close_handle_on_destruction is set. */ - ACE_SHLIB_HANDLE get_handle (int become_owner = 0) const; + ACE_SHLIB_HANDLE get_handle (bool become_owner = false) const; /// Set the handle for the DLL object. By default, the close() /// operation on / the object will be invoked before it is destroyed. @@ -200,7 +200,6 @@ public: /// Flag to record if the last operation had an error. bool error_; - }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/DLL_Manager.cpp b/ACE/ace/DLL_Manager.cpp index 4a25b321da3..01dc236a7ab 100644 --- a/ACE/ace/DLL_Manager.cpp +++ b/ACE/ace/DLL_Manager.cpp @@ -302,7 +302,7 @@ ACE_DLL_Handle::refcount (void) const } void * -ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, int ignore_errors) +ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors) { ACE_TRACE ("ACE_DLL_Handle::symbol"); ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); @@ -322,7 +322,7 @@ ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, int ignore_errors) // error. So you should check the error message also, but since // null symbols won't do us much good anyway, let's still report // an error. - if (!sym && ignore_errors != 1) + if (!sym && !ignore_errors) { if (ACE::debug ()) ACE_ERROR ((LM_ERROR, @@ -339,12 +339,12 @@ ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, int ignore_errors) } ACE_SHLIB_HANDLE -ACE_DLL_Handle::get_handle (int become_owner) +ACE_DLL_Handle::get_handle (bool become_owner) { ACE_TRACE ("ACE_DLL_Handle::get_handle"); ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - if (this->refcount_ == 0 && become_owner != 0) + if (this->refcount_ == 0 && become_owner) { if (ACE::debug ()) ACE_ERROR ((LM_ERROR, @@ -356,7 +356,7 @@ ACE_DLL_Handle::get_handle (int become_owner) ACE_SHLIB_HANDLE handle = this->handle_; - if (become_owner != 0) + if (become_owner) { if (--this->refcount_ == 0) this->handle_ = ACE_SHLIB_INVALID_HANDLE; diff --git a/ACE/ace/DLL_Manager.h b/ACE/ace/DLL_Manager.h index 66da7596105..052f80e6e6f 100644 --- a/ACE/ace/DLL_Manager.h +++ b/ACE/ace/DLL_Manager.h @@ -124,13 +124,13 @@ public: /// ignore_errors flag to supress logging errors if symbol_name isn't /// found. This is nice if you just want to probe a dll to see what's /// available, since missing functions in that case aren't really errors. - void *symbol (const ACE_TCHAR *symbol_name, int ignore_errors = 0); + void *symbol (const ACE_TCHAR *symbol_name, bool ignore_errors = false); /** - * Return the handle to the caller. If @a become_owner is non-0 then + * Return the handle to the caller. If @a become_owner is true then * caller assumes ownership of the handle so we decrement the retcount. */ - ACE_SHLIB_HANDLE get_handle (int become_owner = 0); + ACE_SHLIB_HANDLE get_handle (bool become_owner = false); private: |