summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-17 19:14:11 +0100
committerGitHub <noreply@github.com>2020-12-17 19:14:11 +0100
commit1e402738295727055b851dc682ed8c2cd8dbd431 (patch)
treef033988a6c888c72ecac52e532c47b814b4367b0
parentb5fa839b3d30f2a1fb8b5b642217515c95d2aa93 (diff)
parent3ce6c5358fb44849126db4ef0808bb56a06bccaf (diff)
downloadATCD-1e402738295727055b851dc682ed8c2cd8dbd431.tar.gz
Merge pull request #1350 from jwillemsen/jwi-autoptr2
Change allow_command_ to be a bool
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl12
2 files changed, 7 insertions, 8 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h b/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h
index 84f18bece00..6b2ff5f2ae4 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h
@@ -63,12 +63,11 @@ public:
void disallow_command ();
private:
-
TAO_EC_Auto_Command (const TAO_EC_Auto_Command &);
TAO_EC_Auto_Command & operator= (const TAO_EC_Auto_Command &);
T command_;
- int allow_command_;
+ bool allow_command_;
};
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl b/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl
index 746174798a0..4b85ab2aaae 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl
@@ -5,7 +5,7 @@ template <class T>
ACE_INLINE
TAO_EC_Auto_Command<T>::TAO_EC_Auto_Command (void)
: command_ ()
- , allow_command_ (0)
+ , allow_command_ (false)
{
}
@@ -13,7 +13,7 @@ template <class T>
ACE_INLINE
TAO_EC_Auto_Command<T>::TAO_EC_Auto_Command (const T & command)
: command_ (command)
- , allow_command_ (1)
+ , allow_command_ (true)
{
}
@@ -29,7 +29,7 @@ ACE_INLINE void
TAO_EC_Auto_Command<T>::set_command (const T & command)
{
this->command_ = command;
- this->allow_command_ = 1;
+ this->allow_command_ = true;
}
template <class T>
@@ -50,7 +50,7 @@ TAO_EC_Auto_Command<T>::execute (void)
{
if (this->allow_command_)
{
- this->allow_command_ = 0;
+ this->allow_command_ = false;
try
{
@@ -67,14 +67,14 @@ template <class T>
ACE_INLINE void
TAO_EC_Auto_Command<T>::allow_command (void)
{
- this->allow_command_ = 1;
+ this->allow_command_ = true;
}
template <class T>
ACE_INLINE void
TAO_EC_Auto_Command<T>::disallow_command (void)
{
- this->allow_command_ = 0;
+ this->allow_command_ = false;
}