Skip to content

Commit 1e40273

Browse files
authored
Merge pull request #1350 from jwillemsen/jwi-autoptr2
Change allow_command_ to be a bool
2 parents b5fa839 + 3ce6c53 commit 1e40273

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ class TAO_EC_Auto_Command
6363
void disallow_command ();
6464

6565
private:
66-
6766
TAO_EC_Auto_Command (const TAO_EC_Auto_Command &);
6867
TAO_EC_Auto_Command & operator= (const TAO_EC_Auto_Command &);
6968

7069
T command_;
71-
int allow_command_;
70+
bool allow_command_;
7271
};
7372

7473

TAO/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ template <class T>
55
ACE_INLINE
66
TAO_EC_Auto_Command<T>::TAO_EC_Auto_Command (void)
77
: command_ ()
8-
, allow_command_ (0)
8+
, allow_command_ (false)
99
{
1010
}
1111

1212
template <class T>
1313
ACE_INLINE
1414
TAO_EC_Auto_Command<T>::TAO_EC_Auto_Command (const T & command)
1515
: command_ (command)
16-
, allow_command_ (1)
16+
, allow_command_ (true)
1717
{
1818
}
1919

@@ -29,7 +29,7 @@ ACE_INLINE void
2929
TAO_EC_Auto_Command<T>::set_command (const T & command)
3030
{
3131
this->command_ = command;
32-
this->allow_command_ = 1;
32+
this->allow_command_ = true;
3333
}
3434

3535
template <class T>
@@ -50,7 +50,7 @@ TAO_EC_Auto_Command<T>::execute (void)
5050
{
5151
if (this->allow_command_)
5252
{
53-
this->allow_command_ = 0;
53+
this->allow_command_ = false;
5454

5555
try
5656
{
@@ -67,14 +67,14 @@ template <class T>
6767
ACE_INLINE void
6868
TAO_EC_Auto_Command<T>::allow_command (void)
6969
{
70-
this->allow_command_ = 1;
70+
this->allow_command_ = true;
7171
}
7272

7373
template <class T>
7474
ACE_INLINE void
7575
TAO_EC_Auto_Command<T>::disallow_command (void)
7676
{
77-
this->allow_command_ = 0;
77+
this->allow_command_ = false;
7878
}
7979

8080

0 commit comments

Comments
 (0)