summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-08-27 08:25:31 +0200
committerGitHub <noreply@github.com>2020-08-27 08:25:31 +0200
commita886e56c56209c11b35ebf7c89834ecb9e837882 (patch)
tree87f2fa833961daf128ba8072ec44c558d9809498
parente816643abb2682e5a53a33e61e276183289dba8d (diff)
downloadATCD-revert-995-unspecified-bool-type.tar.gz
Revert "Use unspecified_bool_type instead of bool."revert-995-unspecified-bool-type
-rw-r--r--ACE/ace/Refcounted_Auto_Ptr.h6
-rw-r--r--ACE/ace/Refcounted_Auto_Ptr.inl4
2 files changed, 3 insertions, 7 deletions
diff --git a/ACE/ace/Refcounted_Auto_Ptr.h b/ACE/ace/Refcounted_Auto_Ptr.h
index aa133352a35..670243dc1b5 100644
--- a/ACE/ace/Refcounted_Auto_Ptr.h
+++ b/ACE/ace/Refcounted_Auto_Ptr.h
@@ -44,10 +44,6 @@ template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr;
template <class X, class ACE_LOCK>
class ACE_Refcounted_Auto_Ptr
{
- /// Used to define a proper boolean conversion for "if (sp) ..."
- static void unspecified_bool(ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>***){};
- typedef void (*unspecified_bool_type)(ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>***);
-
public:
/// Constructor that initializes an ACE_Refcounted_Auto_Ptr to
/// the specified pointer value.
@@ -90,7 +86,7 @@ public:
bool operator !() const;
/// Check rep easily.
- operator unspecified_bool_type() const;
+ operator bool () const;
/// Releases the reference to the underlying representation object.
/// @retval The pointer value prior to releasing it.
diff --git a/ACE/ace/Refcounted_Auto_Ptr.inl b/ACE/ace/Refcounted_Auto_Ptr.inl
index 30f3b2e1b02..f495076b153 100644
--- a/ACE/ace/Refcounted_Auto_Ptr.inl
+++ b/ACE/ace/Refcounted_Auto_Ptr.inl
@@ -128,9 +128,9 @@ ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator !() const
}
template<class X, class ACE_LOCK> inline
-ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator unspecified_bool_type () const
+ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator bool () const
{
- return this->rep_->get () != 0 ? unspecified_bool : 0;
+ return this->rep_->get () != 0;
}
template <class X, class ACE_LOCK> inline X*