summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-04-23 03:06:19 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-04-23 03:06:19 +0000
commit25e3a0c84479d9807535ecee744ff579c12890ff (patch)
tree517d13a21fce9eefd531d325e4edb5ba94f70e58 /ace
parent3c54f9635353759fb2af3785a62987827a42abb9 (diff)
downloadATCD-25e3a0c84479d9807535ecee744ff579c12890ff.tar.gz
ChangeLogTag:Thu Apr 22 20:01:12 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ace')
-rw-r--r--ace/ATM_Addr.cpp34
-rw-r--r--ace/ATM_Addr.h4
-rw-r--r--ace/ATM_Addr.i6
-rw-r--r--ace/Active_Map_Manager.h4
-rw-r--r--ace/Active_Map_Manager.i4
-rw-r--r--ace/Addr.h4
-rw-r--r--ace/Addr.i19
-rw-r--r--ace/Atomic_Op.h12
-rw-r--r--ace/Atomic_Op.i12
-rw-r--r--ace/Atomic_Op_T.h24
-rw-r--r--ace/Atomic_Op_T.i34
-rw-r--r--ace/Based_Pointer_T.h12
-rw-r--r--ace/Based_Pointer_T.i15
-rw-r--r--ace/Basic_Types.h24
-rw-r--r--ace/Basic_Types.i24
-rw-r--r--ace/Bound_Ptr.h60
-rw-r--r--ace/Bound_Ptr.i24
-rw-r--r--ace/CDR_Base.cpp12
-rw-r--r--ace/CDR_Base.h10
-rw-r--r--ace/CLASSIX/CLASSIX_Group.h4
-rw-r--r--ace/CLASSIX/CLASSIX_Group.i6
-rw-r--r--ace/CLASSIX/CLASSIX_Port.h4
-rw-r--r--ace/CLASSIX/CLASSIX_Port.i9
-rw-r--r--ace/Cache_Map_Manager_T.h8
-rw-r--r--ace/Cache_Map_Manager_T.i11
-rw-r--r--ace/Cleanup.cpp6
-rw-r--r--ace/Cleanup.h4
-rw-r--r--ace/Configuration.cpp97
-rw-r--r--ace/Configuration.h12
-rw-r--r--ace/Containers_T.cpp17
-rw-r--r--ace/Containers_T.h4
-rw-r--r--ace/Containers_T.i2
-rw-r--r--ace/DEV_Addr.h5
-rw-r--r--ace/DEV_Addr.i8
-rw-r--r--ace/FILE_Addr.h7
-rw-r--r--ace/FILE_Addr.i13
-rw-r--r--ace/Functor_T.h14
-rw-r--r--ace/Functor_T.i17
-rw-r--r--ace/Future.cpp4
-rw-r--r--ace/Future.h20
-rw-r--r--ace/Get_Opt.h2
-rw-r--r--ace/Get_Opt.i28
-rw-r--r--ace/Hash_Map_Manager_T.h12
-rw-r--r--ace/Hash_Map_Manager_T.i12
-rw-r--r--ace/INET_Addr.cpp10
-rw-r--r--ace/INET_Addr.h10
-rw-r--r--ace/INET_Addr.i13
-rw-r--r--ace/IOStream.h2
-rw-r--r--ace/Local_Name_Space.cpp6
-rw-r--r--ace/Local_Name_Space.h6
-rw-r--r--ace/Local_Tokens.h2
-rw-r--r--ace/Local_Tokens.i4
-rw-r--r--ace/MEM_Addr.h8
-rw-r--r--ace/MEM_Addr.i14
-rw-r--r--ace/Map_Manager.h8
-rw-r--r--ace/Map_Manager.i11
-rw-r--r--ace/Map_T.h16
-rw-r--r--ace/Map_T.i8
-rw-r--r--ace/Name_Space.cpp2
-rw-r--r--ace/Name_Space.h2
-rw-r--r--ace/OS_Errno.h4
-rw-r--r--ace/OS_Errno.inl4
-rw-r--r--ace/OS_NS_Thread.cpp20
-rw-r--r--ace/OS_NS_Thread.h12
-rw-r--r--ace/Pair_T.h4
-rw-r--r--ace/Pair_T.i6
-rw-r--r--ace/RB_Tree.h8
-rw-r--r--ace/RB_Tree.i8
-rw-r--r--ace/Refcounted_Auto_Ptr.h23
-rw-r--r--ace/Refcounted_Auto_Ptr.i12
-rw-r--r--ace/Registry.cpp12
-rw-r--r--ace/Registry.h8
-rw-r--r--ace/SPIPE_Addr.h4
-rw-r--r--ace/SPIPE_Addr.i9
-rw-r--r--ace/SString.h8
-rw-r--r--ace/SString.i12
-rw-r--r--ace/Select_Reactor_Base.h4
-rw-r--r--ace/Select_Reactor_Base.i4
-rw-r--r--ace/Service_Config.h4
-rw-r--r--ace/Service_Config.i4
-rw-r--r--ace/Strategies_T.h4
-rw-r--r--ace/Strategies_T.i12
-rw-r--r--ace/String_Base.cpp2
-rw-r--r--ace/String_Base.h21
-rw-r--r--ace/String_Base.i8
-rw-r--r--ace/Thread_Manager.h4
-rw-r--r--ace/Thread_Manager.i4
-rw-r--r--ace/Time_Value.h24
-rw-r--r--ace/Time_Value.inl13
-rw-r--r--ace/Timeprobe.h2
-rw-r--r--ace/Timeprobe.i4
-rw-r--r--ace/UNIX_Addr.h4
-rw-r--r--ace/UNIX_Addr.i12
-rw-r--r--ace/Unbounded_Set.cpp4
-rw-r--r--ace/Unbounded_Set.h8
-rw-r--r--ace/Unbounded_Set_Ex.cpp8
-rw-r--r--ace/Unbounded_Set_Ex.h8
-rw-r--r--ace/Vector_T.cpp13
-rw-r--r--ace/Vector_T.h6
-rw-r--r--ace/Vector_T.i2
100 files changed, 571 insertions, 548 deletions
diff --git a/ace/ATM_Addr.cpp b/ace/ATM_Addr.cpp
index 8882854f85a..4bcc83fe5e6 100644
--- a/ace/ATM_Addr.cpp
+++ b/ace/ATM_Addr.cpp
@@ -261,7 +261,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
}
else if ((entry = gethostbyname_atmnsap ((ACE_TCHAR *)sap)) != 0)
{
- ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
+ ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
entry->h_addr_list[0],
ATMNSAP_ADDR_LEN - 1);
}
@@ -282,7 +282,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
CSADDR_INFO csaBuffer;
WCHAR tmpWStr[100];
- MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, sap, -1, tmpWStr, 100);
+ MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, sap, -1, tmpWStr, 100);
csaBuffer.LocalAddr.iSockaddrLength = sizeof (struct sockaddr_atm);
csaBuffer.LocalAddr.lpSockaddr = (struct sockaddr *)&atm_addr_;
@@ -304,26 +304,26 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
qsRestrictions.lpcsaBuffer = &csaBuffer;
qsRestrictions.lpBlob = 0; //&blob;
- if (::WSALookupServiceBeginW (&qsRestrictions, LUP_RETURN_ALL, &hLookup)
+ if (::WSALookupServiceBeginW (&qsRestrictions, LUP_RETURN_ALL, &hLookup)
== SOCKET_ERROR) {
ACE_OS::printf ("Error: WSALookupServiceBeginW failed! %d\n",
::WSAGetLastError ());
return -1;
- }
+ }
dwValue = sizeof (WSAQUERYSETW);
- if (::WSALookupServiceNextW (hLookup, 0, &dwValue, &qsRestrictions)
+ if (::WSALookupServiceNextW (hLookup, 0, &dwValue, &qsRestrictions)
== SOCKET_ERROR) {
if (WSAGetLastError () != WSA_E_NO_MORE) {
- ACE_OS::printf ("Error: WSALookupServiceNextW failed! %d\n",
+ ACE_OS::printf ("Error: WSALookupServiceNextW failed! %d\n",
::WSAGetLastError ());
return -1;
}
}
if (WSALookupServiceEnd (hLookup) == SOCKET_ERROR) {
- ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d \n",
+ ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d \n",
::WSAGetLastError ());
errno = EINVAL;
return -1;
@@ -334,9 +334,9 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
return -1;
}
- if (text2atm ((ACE_TCHAR *)sap,
- (struct sockaddr *)& (atm_addr_.sockaddratmsvc),
- sizeof (atm_addr_.sockaddratmsvc),
+ if (text2atm ((ACE_TCHAR *)sap,
+ (struct sockaddr *)& (atm_addr_.sockaddratmsvc),
+ sizeof (atm_addr_.sockaddratmsvc),
T2A_SVC | T2A_NAME) < 0) {
ACE_DEBUG (LM_DEBUG,
"Error : text2atm failed!\n");
@@ -345,7 +345,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
}
#else
ACE_UNUSED_ARG (sap);
-
+
return 0;
#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
@@ -384,13 +384,13 @@ ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
ACE_TCHAR buffer[MAXNAMELEN + 1];
int i;
- if (addrlen < ATM_ADDR_SIZE + 1)
+ if (addrlen < ATM_ADDR_SIZE + 1)
return -1;
for (i = 0; i < ATM_ADDR_SIZE; i++) {
buffer[ i * 3 ] = '\0';
- ACE_OS::sprintf (buffer, ACE_LIB_TEXT ("%s%02x."),
- buffer,
+ ACE_OS::sprintf (buffer, ACE_LIB_TEXT ("%s%02x."),
+ buffer,
atm_addr_.satm_number.Addr[ i ]);
}
@@ -403,7 +403,7 @@ ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
int total_len;
if ((total_len = atm2text (buffer,
sizeof buffer,
- (struct sockaddr *)& (atm_addr_.sockaddratmsvc),
+ (struct sockaddr *)& (atm_addr_.sockaddratmsvc),
A2T_PRETTY)) < 0) {
ACE_DEBUG ((LM_DEBUG,"ACE_ATM_Addr (addr_to_string): atm2text failed\n"));
return -1;
@@ -455,7 +455,7 @@ ACE_ATM_Addr::set_addr (void *addr, int len)
// Compare two addresses for inequality.
-int
+bool
ACE_ATM_Addr::operator != (const ACE_ATM_Addr &sap) const
{
ACE_TRACE ("ACE_ATM_Addr::operator !=");
@@ -464,7 +464,7 @@ ACE_ATM_Addr::operator != (const ACE_ATM_Addr &sap) const
// Compare two addresses for equality.
-int
+bool
ACE_ATM_Addr::operator == (const ACE_ATM_Addr &sap) const
{
ACE_TRACE ("ACE_ATM_Addr::operator ==");
diff --git a/ace/ATM_Addr.h b/ace/ATM_Addr.h
index de304d2680f..574d180f310 100644
--- a/ace/ATM_Addr.h
+++ b/ace/ATM_Addr.h
@@ -156,10 +156,10 @@ public:
* equal if they contain the same ATM address. Q: Is there any
* other check for equality needed for ATM?
*/
- int operator == (const ACE_ATM_Addr &SAP) const;
+ bool operator == (const ACE_ATM_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_ATM_Addr &SAP) const;
+ bool operator != (const ACE_ATM_Addr &SAP) const;
/// Dump the state of an object.
void dump (void) const;
diff --git a/ace/ATM_Addr.i b/ace/ATM_Addr.i
index 30c0d85cb3f..48823c1ec81 100644
--- a/ace/ATM_Addr.i
+++ b/ace/ATM_Addr.i
@@ -1,9 +1,8 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// ATM_Addr.i
-// Default dtor.
ACE_INLINE
ACE_ATM_Addr::~ACE_ATM_Addr (void)
{
@@ -47,4 +46,3 @@ ACE_ATM_Addr::set_selector (u_char selector)
ACE_UNUSED_ARG (selector);
#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
}
-
diff --git a/ace/Active_Map_Manager.h b/ace/Active_Map_Manager.h
index b91fd261932..4df059fc9a9 100644
--- a/ace/Active_Map_Manager.h
+++ b/ace/Active_Map_Manager.h
@@ -70,8 +70,8 @@ public:
void encode (void *data) const;
/// Compare keys.
- int operator== (const ACE_Active_Map_Manager_Key &rhs) const;
- int operator!= (const ACE_Active_Map_Manager_Key &rhs) const;
+ bool operator== (const ACE_Active_Map_Manager_Key &rhs) const;
+ bool operator!= (const ACE_Active_Map_Manager_Key &rhs) const;
// = This really should be protected but because of template
// friends, they are not.
diff --git a/ace/Active_Map_Manager.i b/ace/Active_Map_Manager.i
index 0c067fef9d8..491b25430b7 100644
--- a/ace/Active_Map_Manager.i
+++ b/ace/Active_Map_Manager.i
@@ -33,7 +33,7 @@ ACE_Active_Map_Manager_Key::slot_generation (void) const
return this->key_data_.slot_generation_;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const
{
return
@@ -41,7 +41,7 @@ ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) c
this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const
{
return !this->operator== (rhs);
diff --git a/ace/Addr.h b/ace/Addr.h
index d6bfbaa134b..d68669a93ef 100644
--- a/ace/Addr.h
+++ b/ace/Addr.h
@@ -62,10 +62,10 @@ public:
// = Equality/inequality tests
/// Check for address equality.
- int operator == (const ACE_Addr &sap) const;
+ bool operator == (const ACE_Addr &sap) const;
/// Check for address inequality.
- int operator != (const ACE_Addr &sap) const;
+ bool operator != (const ACE_Addr &sap) const;
/// Initializes instance variables.
void base_set (int type, int size);
diff --git a/ace/Addr.i b/ace/Addr.i
index dd5bcf64599..95b90655bd9 100644
--- a/ace/Addr.i
+++ b/ace/Addr.i
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
// Addr.i
@@ -11,26 +12,26 @@ ACE_Addr::get_addr (void) const
return 0;
}
-ACE_INLINE void
+ACE_INLINE void
ACE_Addr::set_addr (void *, int)
{
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Addr::operator == (const ACE_Addr &sap) const
{
return (sap.addr_type_ == this->addr_type_ &&
sap.addr_size_ == this->addr_size_ );
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Addr::operator != (const ACE_Addr &sap) const
{
return (sap.addr_type_ != this->addr_type_ ||
sap.addr_size_ != this->addr_size_ );
}
-// Return the size of the address.
+// Return the size of the address.
ACE_INLINE int
ACE_Addr::get_size (void) const
@@ -38,7 +39,7 @@ ACE_Addr::get_size (void) const
return this->addr_size_;
}
-// Sets the size of the address.
+// Sets the size of the address.
ACE_INLINE void
ACE_Addr::set_size (int size)
@@ -46,7 +47,7 @@ ACE_Addr::set_size (int size)
this->addr_size_ = size;
}
-// Return the type of the address.
+// Return the type of the address.
ACE_INLINE int
ACE_Addr::get_type (void) const
@@ -54,7 +55,7 @@ ACE_Addr::get_type (void) const
return this->addr_type_;
}
-// Set the type of the address.
+// Set the type of the address.
ACE_INLINE void
ACE_Addr::set_type (int type)
@@ -62,7 +63,7 @@ ACE_Addr::set_type (int type)
this->addr_type_ = type;
}
-ACE_INLINE unsigned long
+ACE_INLINE unsigned long
ACE_Addr::hash (void) const
{
return 0;
diff --git a/ace/Atomic_Op.h b/ace/Atomic_Op.h
index 0d3730b477f..caea5817def 100644
--- a/ace/Atomic_Op.h
+++ b/ace/Atomic_Op.h
@@ -85,22 +85,22 @@ public:
long operator-= (long rhs);
/// Atomically compare <value_> with rhs.
- int operator== (long rhs) const;
+ bool operator== (long rhs) const;
/// Atomically compare <value_> with rhs.
- int operator!= (long rhs) const;
+ bool operator!= (long rhs) const;
/// Atomically check if <value_> greater than or equal to rhs.
- int operator>= (long rhs) const;
+ bool operator>= (long rhs) const;
/// Atomically check if <value_> greater than rhs.
- int operator> (long rhs) const;
+ bool operator> (long rhs) const;
/// Atomically check if <value_> less than or equal to rhs.
- int operator<= (long rhs) const;
+ bool operator<= (long rhs) const;
/// Atomically check if <value_> less than rhs.
- int operator< (long rhs) const;
+ bool operator< (long rhs) const;
/// Atomically assign rhs to <value_>.
void operator= (long rhs);
diff --git a/ace/Atomic_Op.i b/ace/Atomic_Op.i
index dfae7e33526..2cbaa125be6 100644
--- a/ace/Atomic_Op.i
+++ b/ace/Atomic_Op.i
@@ -78,37 +78,37 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (long rhs)
#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator== (long rhs) const
{
return (this->value_ == rhs);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator!= (long rhs) const
{
return (this->value_ != rhs);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator>= (long rhs) const
{
return (this->value_ >= rhs);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator> (long rhs) const
{
return (this->value_ > rhs);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator<= (long rhs) const
{
return (this->value_ <= rhs);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator< (long rhs) const
{
return (this->value_ < rhs);
diff --git a/ace/Atomic_Op_T.h b/ace/Atomic_Op_T.h
index 260ffa7b3f9..65f57f70a6d 100644
--- a/ace/Atomic_Op_T.h
+++ b/ace/Atomic_Op_T.h
@@ -71,22 +71,22 @@ public:
TYPE operator-= (const TYPE &rhs);
/// Atomically compare <value_> with rhs.
- int operator== (const TYPE &rhs) const;
+ bool operator== (const TYPE &rhs) const;
/// Atomically compare <value_> with rhs.
- int operator!= (const TYPE &rhs) const;
+ bool operator!= (const TYPE &rhs) const;
/// Atomically check if <value_> greater than or equal to rhs.
- int operator>= (const TYPE &rhs) const;
+ bool operator>= (const TYPE &rhs) const;
/// Atomically check if <value_> greater than rhs.
- int operator> (const TYPE &rhs) const;
+ bool operator> (const TYPE &rhs) const;
/// Atomically check if <value_> less than or equal to rhs.
- int operator<= (const TYPE &rhs) const;
+ bool operator<= (const TYPE &rhs) const;
/// Atomically check if <value_> less than rhs.
- int operator< (const TYPE &rhs) const;
+ bool operator< (const TYPE &rhs) const;
/// Atomically assign rhs to <value_>.
void operator= (const TYPE &rhs);
@@ -183,22 +183,22 @@ public:
TYPE operator-= (const TYPE &rhs);
/// Atomically compare <value_> with rhs.
- int operator== (const TYPE &rhs) const;
+ bool operator== (const TYPE &rhs) const;
/// Atomically compare <value_> with rhs.
- int operator!= (const TYPE &rhs) const;
+ bool operator!= (const TYPE &rhs) const;
/// Atomically check if <value_> greater than or equal to rhs.
- int operator>= (const TYPE &rhs) const;
+ bool operator>= (const TYPE &rhs) const;
/// Atomically check if <value_> greater than rhs.
- int operator> (const TYPE &rhs) const;
+ bool operator> (const TYPE &rhs) const;
/// Atomically check if <value_> less than or equal to rhs.
- int operator<= (const TYPE &rhs) const;
+ bool operator<= (const TYPE &rhs) const;
/// Atomically check if <value_> less than rhs.
- int operator< (const TYPE &rhs) const;
+ bool operator< (const TYPE &rhs) const;
/// Explicitly return <value_>.
TYPE value (void) const;
diff --git a/ace/Atomic_Op_T.i b/ace/Atomic_Op_T.i
index b741a2a521a..ccdfee63905 100644
--- a/ace/Atomic_Op_T.i
+++ b/ace/Atomic_Op_T.i
@@ -64,50 +64,50 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator-- (int)
return this->value_--;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator== (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator==");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, 0);
+ ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, false);
return this->value_ == rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator!= (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator!=");
return !(*this == rhs);
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator>= (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator>=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, 0);
+ ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, false);
return this->value_ >= rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator> (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator>");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, 0);
+ ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, false);
return this->value_ > rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator<= (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator<=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, 0);
+ ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, false);
return this->value_ <= rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator< (const TYPE &rhs) const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator<");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, 0);
+ ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, false);
return this->value_ < rhs;
}
@@ -202,37 +202,37 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-= (const TYPE &rhs)
return this->impl_ -= rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator== (const TYPE &rhs) const
{
return this->impl_ == rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator!= (const TYPE &rhs) const
{
return this->impl_ != rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator>= (const TYPE &rhs) const
{
return this->impl_ >= rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator> (const TYPE &rhs) const
{
return this->impl_ > rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator<= (const TYPE &rhs) const
{
return this->impl_ <= rhs;
}
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
+template <class ACE_LOCK, class TYPE> ACE_INLINE bool
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator< (const TYPE &rhs) const
{
return this->impl_ < rhs;
diff --git a/ace/Based_Pointer_T.h b/ace/Based_Pointer_T.h
index c2d2212d021..1dfd10c207c 100644
--- a/ace/Based_Pointer_T.h
+++ b/ace/Based_Pointer_T.h
@@ -100,22 +100,22 @@ public:
CONCRETE operator * (void) const;
/// Less than operator.
- int operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Less than or equal operator.
- int operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Greater than operator.
- int operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Greater than or equal operator.
- int operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Equality operator.
- int operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Inequality operator.
- int operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
+ bool operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
/// Subscript operator.
CONCRETE operator [](int index) const;
diff --git a/ace/Based_Pointer_T.i b/ace/Based_Pointer_T.i
index 087a8cbf1e2..b2b5afea868 100644
--- a/ace/Based_Pointer_T.i
+++ b/ace/Based_Pointer_T.i
@@ -35,7 +35,7 @@ ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs)
- ((char *) this - this->base_offset_));
}
-template <class CONCRETE> ACE_INLINE CONCRETE
+template <class CONCRETE> ACE_INLINE CONCRETE
ACE_Based_Pointer_Basic<CONCRETE>::operator *(void) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator *");
@@ -79,42 +79,42 @@ ACE_Based_Pointer_Basic<CONCRETE>::operator += (int index)
this->base_offset_ += (index * sizeof (CONCRETE));
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator == (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator ==");
return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs);
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator != (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator !=");
return !(*this == rhs);
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator < (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <");
return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs);
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <=");
return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs);
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator > (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >");
return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs);
}
-template <class CONCRETE> ACE_INLINE int
+template <class CONCRETE> ACE_INLINE bool
ACE_Based_Pointer_Basic<CONCRETE>::operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
{
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >=");
@@ -134,4 +134,3 @@ ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer<CONCRETE> &rhs)
ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator=");
*this = rhs.addr ();
}
-
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index 2ebf5b9eb43..9c1d8148261 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -372,18 +372,18 @@ typedef ptrdiff_t ptr_arith_t;
~ACE_U_LongLong (void);
// = Overloaded relation operators.
- int operator== (const ACE_U_LongLong &) const;
- int operator== (const ACE_UINT32) const;
- int operator!= (const ACE_U_LongLong &) const;
- int operator!= (const ACE_UINT32) const;
- int operator< (const ACE_U_LongLong &) const;
- int operator< (const ACE_UINT32) const;
- int operator<= (const ACE_U_LongLong &) const;
- int operator<= (const ACE_UINT32) const;
- int operator> (const ACE_U_LongLong &) const;
- int operator> (const ACE_UINT32) const;
- int operator>= (const ACE_U_LongLong &) const;
- int operator>= (const ACE_UINT32) const;
+ bool operator== (const ACE_U_LongLong &) const;
+ bool operator== (const ACE_UINT32) const;
+ bool operator!= (const ACE_U_LongLong &) const;
+ bool operator!= (const ACE_UINT32) const;
+ bool operator< (const ACE_U_LongLong &) const;
+ bool operator< (const ACE_UINT32) const;
+ bool operator<= (const ACE_U_LongLong &) const;
+ bool operator<= (const ACE_UINT32) const;
+ bool operator> (const ACE_U_LongLong &) const;
+ bool operator> (const ACE_UINT32) const;
+ bool operator>= (const ACE_U_LongLong &) const;
+ bool operator>= (const ACE_UINT32) const;
ACE_U_LongLong operator+ (const ACE_U_LongLong &) const;
ACE_U_LongLong operator+ (const ACE_UINT32) const;
diff --git a/ace/Basic_Types.i b/ace/Basic_Types.i
index ec6c5f2d664..5a1e323330d 100644
--- a/ace/Basic_Types.i
+++ b/ace/Basic_Types.i
@@ -40,31 +40,31 @@ ACE_U_LongLong::~ACE_U_LongLong (void)
{
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const
{
return h_ () == n.h_ () && l_ () == n.l_ ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator== (const ACE_UINT32 n) const
{
return h_ () == 0 && l_ () == n;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const
{
return ! (*this == n);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator!= (const ACE_UINT32 n) const
{
return ! (*this == n);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const
{
return h_ () < n.h_ () ? 1
@@ -72,13 +72,13 @@ ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const
: l_ () < n.l_ ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator< (const ACE_UINT32 n) const
{
return operator< (ACE_static_cast (const ACE_U_LongLong, n));
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const
{
return h_ () < n.h_ () ? 1
@@ -86,13 +86,13 @@ ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const
: l_ () <= n.l_ ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator<= (const ACE_UINT32 n) const
{
return operator<= (ACE_static_cast (const ACE_U_LongLong, n));
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const
{
return h_ () > n.h_ () ? 1
@@ -100,13 +100,13 @@ ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const
: l_ () > n.l_ ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator> (const ACE_UINT32 n) const
{
return operator> (ACE_static_cast (const ACE_U_LongLong, n));
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const
{
return h_ () > n.h_ () ? 1
@@ -114,7 +114,7 @@ ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const
: l_ () >= n.l_ ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_U_LongLong::operator>= (const ACE_UINT32 n) const
{
return operator>= (ACE_static_cast (const ACE_U_LongLong, n));
diff --git a/ace/Bound_Ptr.h b/ace/Bound_Ptr.h
index e9391aa1573..9bccf39b1cf 100644
--- a/ace/Bound_Ptr.h
+++ b/ace/Bound_Ptr.h
@@ -132,35 +132,37 @@ public:
/// Assignment operator that binds <this> and <r> to the same object.
void operator = (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r);
- /// Equality operator that returns 1 if both ACE_Strong_Bound_Ptr
- /// instances point to the same underlying object.
+ /// Equality operator that returns @c true if both
+ /// ACE_Strong_Bound_Ptr instances point to the same underlying
+ /// object.
/**
- * @note It also returns 1 if both objects have just been
+ * @note It also returns @c true if both objects have just been
* instantiated and not used yet.
*/
- int operator == (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator == (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
- /// Equality operator that returns 1 if the ACE_Strong_Bound_Ptr and
- /// ACE_Weak_Bound_Ptr objects point to the same underlying object.
+ /// Equality operator that returns true if the ACE_Strong_Bound_Ptr
+ /// and ACE_Weak_Bound_Ptr objects point to the same underlying
+ /// object.
/**
- *
- * @note It also returns 1 if both objects have just been
+ * @note It also returns @c true if both objects have just been
* instantiated and not used yet.
*/
- int operator == (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator == (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
- /// Equality operator that returns 1 if the ACE_Strong_Bound_Ptr and
- /// the raw pointer point to the same underlying object.
- int operator == (X *p) const;
+ /// Equality operator that returns @c true if the
+ /// ACE_Strong_Bound_Ptr and the raw pointer point to the same
+ /// underlying object.
+ bool operator == (X *p) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator != (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator != (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (X *p) const;
+ bool operator != (X *p) const;
/// Redirection operator
X *operator-> (void) const;
@@ -239,35 +241,35 @@ public:
/// Assignment operator that binds <this> and <r> to the same object.
void operator = (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r);
- /// Equality operator that returns 1 if both ACE_Weak_Bound_Ptr
- /// objects point to the same underlying object.
+ /// Equality operator that returns @c true if both
+ /// ACE_Weak_Bound_Ptr objects point to the same underlying object.
/**
- * @note It also returns 1 if both objects have just been
+ * @note It also returns @c true if both objects have just been
* instantiated and not used yet.
*/
- int operator == (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator == (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
- /// Equality operator that returns 1 if the ACE_Weak_Bound_Ptr and
- /// ACE_Strong_Bound_Ptr objects point to the same underlying
+ /// Equality operator that returns @c true if the ACE_Weak_Bound_Ptr
+ /// and ACE_Strong_Bound_Ptr objects point to the same underlying
/// object.
/**
- * @note It also returns 1 if both objects have just been
+ * @note It also returns @c true if both objects have just been
* instantiated and not used yet.
*/
- int operator == (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator == (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
- /// Equality operator that returns 1 if the ACE_Weak_Bound_Ptr and
- /// the raw pointer point to the same underlying object.
- int operator == (X *p) const;
+ /// Equality operator that returns @c true if the ACE_Weak_Bound_Ptr
+ /// and the raw pointer point to the same underlying object.
+ bool operator == (X *p) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator != (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
+ bool operator != (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (X *p) const;
+ bool operator != (X *p) const;
/// Redirection operator.
/**
diff --git a/ace/Bound_Ptr.i b/ace/Bound_Ptr.i
index 6fd27cf1cbc..f95b7c94f59 100644
--- a/ace/Bound_Ptr.i
+++ b/ace/Bound_Ptr.i
@@ -224,39 +224,39 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Weak_Bound_Ptr<X, ACE_L
this->ptr_ = new_ptr;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const
{
return this->ptr_ == r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const
{
// Use the weak pointer's operator== since it will check for null.
return r == *this;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator== (X *p) const
{
return this->ptr_ == p;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const
{
return this->ptr_ != r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const
{
// Use the weak pointer's operator!= since it will check for null.
return r != *this;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator!= (X *p) const
{
return this->ptr_ != p;
@@ -359,7 +359,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Strong_Bound_Ptr<X, ACE_L
this->ptr_ = rhs.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const
{
// A weak pointer must behave as though it is automatically set to null
@@ -370,7 +370,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Weak_Bound_Ptr<X, ACE_LOC
return this->ptr_ == r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const
{
// A weak pointer must behave as though it is automatically set to null
@@ -381,7 +381,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (const ACE_Strong_Bound_Ptr<X, ACE_L
return this->ptr_ == r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (X *p) const
{
// A weak pointer must behave as though it is automatically set to null
@@ -392,7 +392,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator== (X *p) const
return this->ptr_ == p;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Weak_Bound_Ptr<X, ACE_LOCK> &r) const
{
// A weak pointer must behave as though it is automatically set to null
@@ -403,7 +403,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Weak_Bound_Ptr<X, ACE_LOC
return this->ptr_ != r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Strong_Bound_Ptr<X, ACE_LOCK> &r) const
{
// A weak pointer must behave as though it is automatically set to null
@@ -414,7 +414,7 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator!= (const ACE_Strong_Bound_Ptr<X, ACE_L
return this->ptr_ != r.ptr_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::operator!= (X *p) const
{
// A weak pointer must behave as though it is automatically set to null
diff --git a/ace/CDR_Base.cpp b/ace/CDR_Base.cpp
index dc3211c0ece..f4809a00afa 100644
--- a/ace/CDR_Base.cpp
+++ b/ace/CDR_Base.cpp
@@ -544,13 +544,13 @@ ACE_CDR::consolidate (ACE_Message_Block *dst,
}
#if defined (NONNATIVE_LONGLONG)
-int
+bool
ACE_CDR::LongLong::operator== (const ACE_CDR::LongLong &rhs) const
{
return this->h == rhs.h && this->l == rhs.l;
}
-int
+bool
ACE_CDR::LongLong::operator!= (const ACE_CDR::LongLong &rhs) const
{
return this->l != rhs.l || this->h != rhs.h;
@@ -559,13 +559,13 @@ ACE_CDR::LongLong::operator!= (const ACE_CDR::LongLong &rhs) const
#endif /* NONNATIVE_LONGLONG */
#if defined (NONNATIVE_LONGDOUBLE)
-int
+bool
ACE_CDR::LongDouble::operator== (const ACE_CDR::LongDouble &rhs) const
{
return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0;
}
-int
+bool
ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const
{
return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0;
@@ -589,9 +589,9 @@ ACE_CDR::Float::operator= (const float & /* rhs */)
return *this;
}
-int
+bool
ACE_CDR::Float::operator!= (const ACE_CDR::Float & /* rhs */) const
{
- return 0;
+ return false;
}
#endif /* _UNICOS */
diff --git a/ace/CDR_Base.h b/ace/CDR_Base.h
index 45fde40d4bb..f32326ed0d5 100644
--- a/ace/CDR_Base.h
+++ b/ace/CDR_Base.h
@@ -211,8 +211,8 @@ public:
* The canonical comparison operators.
*/
//@{
- int operator== (const LongLong &rhs) const;
- int operator!= (const LongLong &rhs) const;
+ bool operator== (const LongLong &rhs) const;
+ bool operator!= (const LongLong &rhs) const;
//@}
};
# endif /* no native 64 bit integer type */
@@ -238,7 +238,7 @@ public:
Float (void);
Float (const float &init);
Float & operator= (const float &rhs);
- int operator!= (const Float &rhs) const;
+ bool operator!= (const Float &rhs) const;
# endif /* _UNICOS */
# endif /* ACE_SIZEOF_INT != 4 */
};
@@ -273,8 +273,8 @@ public:
struct ACE_Export LongDouble
{
char ld[16];
- int operator== (const LongDouble &rhs) const;
- int operator!= (const LongDouble &rhs) const;
+ bool operator== (const LongDouble &rhs) const;
+ bool operator!= (const LongDouble &rhs) const;
// @@ also need other comparison operators.
};
# endif /* ACE_SIZEOF_LONG_DOUBLE != 16 */
diff --git a/ace/CLASSIX/CLASSIX_Group.h b/ace/CLASSIX/CLASSIX_Group.h
index a1cebf0a638..0b8f9fc75a2 100644
--- a/ace/CLASSIX/CLASSIX_Group.h
+++ b/ace/CLASSIX/CLASSIX_Group.h
@@ -75,8 +75,8 @@ class ACE_CLASSIX_Group : public ACE_CLASSIX_Addr
// Inserts/removes the specified port in to the group
// Returns 0, if successful; returns a negative value otherwise
- int operator == (const ACE_CLASSIX_Group &) const;
- int operator != (const ACE_CLASSIX_Group &) const;
+ bool operator == (const ACE_CLASSIX_Group &) const;
+ bool operator != (const ACE_CLASSIX_Group &) const;
// = HELPER
void dump(void) const;
diff --git a/ace/CLASSIX/CLASSIX_Group.i b/ace/CLASSIX/CLASSIX_Group.i
index e3650502a10..9ca1f49875e 100644
--- a/ace/CLASSIX/CLASSIX_Group.i
+++ b/ace/CLASSIX/CLASSIX_Group.i
@@ -72,17 +72,17 @@ ACE_CLASSIX_Group::get_cap(void) const
}
ACE_INLINE
-int
+bool
ACE_CLASSIX_Group::operator ==(const ACE_CLASSIX_Group & theRhs) const
{
- return
+ return
this->is_configured() &&
theRhs.is_configured() &&
((KnCap) (this->get_cap()) == (KnCap) (theRhs.get_cap()));
}
ACE_INLINE
-int
+bool
ACE_CLASSIX_Group::operator !=(const ACE_CLASSIX_Group & theRhs) const
{
return !(*this == theRhs);
diff --git a/ace/CLASSIX/CLASSIX_Port.h b/ace/CLASSIX/CLASSIX_Port.h
index 31b551d847f..ee26c195870 100644
--- a/ace/CLASSIX/CLASSIX_Port.h
+++ b/ace/CLASSIX/CLASSIX_Port.h
@@ -118,11 +118,11 @@ public:
/* -----------------------------------------------------*/
// = Comparison
//
- int operator == (const ACE_CLASSIX_Port &) const;
+ bool operator == (const ACE_CLASSIX_Port &) const;
// Compare two addresses for equality. The addresses are considered
// equal if they have the same content in the KnUniqueId address structure.
- int operator != (const ACE_CLASSIX_Port &) const;
+ bool operator != (const ACE_CLASSIX_Port &) const;
// Compare two addresses for inequality.
/* -----------------------------------------------------*/
diff --git a/ace/CLASSIX/CLASSIX_Port.i b/ace/CLASSIX/CLASSIX_Port.i
index 762f6ec5794..ac0504ca2c0 100644
--- a/ace/CLASSIX/CLASSIX_Port.i
+++ b/ace/CLASSIX/CLASSIX_Port.i
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
ACE_INLINE
@@ -94,10 +95,10 @@ ACE_CLASSIX_Port::disable(void) const
// Compare two addresses for equality.
ACE_INLINE
-int
+bool
ACE_CLASSIX_Port::operator==(const ACE_CLASSIX_Port &theSrc) const
{
- return
+ return
this->ACE_Addr::operator == (theSrc) &&
this->addr_.id.uiHead == theSrc.addr_.id.uiHead &&
this->addr_.id.uiTail == theSrc.addr_.id.uiTail &&
@@ -105,7 +106,7 @@ ACE_CLASSIX_Port::operator==(const ACE_CLASSIX_Port &theSrc) const
}
ACE_INLINE
-int
+bool
ACE_CLASSIX_Port::operator != (const ACE_CLASSIX_Port &sap) const
{
return !((*this) == sap);
diff --git a/ace/Cache_Map_Manager_T.h b/ace/Cache_Map_Manager_T.h
index e32b30fc487..3db18ce64d1 100644
--- a/ace/Cache_Map_Manager_T.h
+++ b/ace/Cache_Map_Manager_T.h
@@ -295,8 +295,8 @@ public:
CACHING_STRATEGY, ATTRIBUTES> &rhs);
/// Comparision operators.
- int operator== (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- int operator!= (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
+ bool operator== (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
+ bool operator!= (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
/// Returns a reference to the internal element <this> is pointing
/// to.
@@ -369,8 +369,8 @@ public:
CACHING_STRATEGY, ATTRIBUTES> &rhs);
/// Comparision operators.
- int operator== (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- int operator!= (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
+ bool operator== (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
+ bool operator!= (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
/// Returns a reference to the internal element <this> is pointing
/// to.
diff --git a/ace/Cache_Map_Manager_T.i b/ace/Cache_Map_Manager_T.i
index d4a77422224..63ef936375e 100644
--- a/ace/Cache_Map_Manager_T.i
+++ b/ace/Cache_Map_Manager_T.i
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
//$Id$
#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
@@ -95,13 +96,13 @@ ACE_Cache_Map_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Iterator<ACE_T2>
return *this;
}
-template <ACE_T1> ACE_INLINE int
+template <ACE_T1> ACE_INLINE bool
ACE_Cache_Map_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
{
return this->iterator_implementation_ == rhs.iterator_implementation_;
}
-template <ACE_T1> ACE_INLINE int
+template <ACE_T1> ACE_INLINE bool
ACE_Cache_Map_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
{
return this->iterator_implementation_ != rhs.iterator_implementation_;
@@ -195,13 +196,13 @@ ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Reverse_I
return *this;
}
-template <ACE_T1> ACE_INLINE int
+template <ACE_T1> ACE_INLINE bool
ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
{
return this->reverse_iterator_implementation_ == rhs.reverse_iterator_implementation_;
}
-template <ACE_T1> ACE_INLINE int
+template <ACE_T1> ACE_INLINE bool
ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
{
return this->reverse_iterator_implementation_ != rhs.reverse_iterator_implementation_;
diff --git a/ace/Cleanup.cpp b/ace/Cleanup.cpp
index bd3480d5f3b..1bb4eca58a9 100644
--- a/ace/Cleanup.cpp
+++ b/ace/Cleanup.cpp
@@ -39,7 +39,7 @@ ACE_Cleanup_Info::ACE_Cleanup_Info (void)
{
}
-int
+bool
ACE_Cleanup_Info::operator== (const ACE_Cleanup_Info &o) const
{
return o.object_ == this->object_
@@ -47,7 +47,7 @@ ACE_Cleanup_Info::operator== (const ACE_Cleanup_Info &o) const
&& o.param_ == this->param_;
}
-int
+bool
ACE_Cleanup_Info::operator!= (const ACE_Cleanup_Info &o) const
{
return !(*this == o);
@@ -185,5 +185,3 @@ ACE_OS_Exit_Info::call_hooks ()
(*info.cleanup_hook_) (info.object_, info.param_);
}
}
-
-
diff --git a/ace/Cleanup.h b/ace/Cleanup.h
index 0ff91add78f..117c65f60e3 100644
--- a/ace/Cleanup.h
+++ b/ace/Cleanup.h
@@ -60,10 +60,10 @@ public:
ACE_Cleanup_Info (void);
/// Equality operator.
- int operator== (const ACE_Cleanup_Info &o) const;
+ bool operator== (const ACE_Cleanup_Info &o) const;
/// Inequality operator.
- int operator!= (const ACE_Cleanup_Info &o) const;
+ bool operator!= (const ACE_Cleanup_Info &o) const;
/// Point to object that gets passed into the <cleanup_hook_>.
void *object_;
diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp
index 43f98e4f748..e1eddc9e062 100644
--- a/ace/Configuration.cpp
+++ b/ace/Configuration.cpp
@@ -263,9 +263,10 @@ ACE_Configuration::root_section (void) const
* contents of the object on the right hand side.
* Returns 1 (True) if they are equal and 0 (False) if they are not equal
*/
-int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
+bool
+ACE_Configuration::operator== (const ACE_Configuration& rhs) const
{
- int rc = 1;
+ bool rc = true;
int sectionIndex = 0;
ACE_TString sectionName;
ACE_Configuration *nonconst_this = ACE_const_cast (ACE_Configuration*, this);
@@ -288,7 +289,7 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
{
// If the rhs object does not contain the section then we are
// not equal.
- rc = 0;
+ rc = false;
}
else if (nonconst_this->open_section (this->root_,
sectionName.c_str (),
@@ -296,7 +297,7 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
thisSection) != 0)
{
// if there is some error opening the section in this object
- rc = 0;
+ rc = false;
}
else
{
@@ -319,12 +320,12 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
{
// We're not equal if the same value cannot
// be found in the rhs object.
- rc = 0;
+ rc = false;
}
else if (valueType != rhsType)
{
// we're not equal if the types do not match.
- rc = 0;
+ rc = false;
}
else
{
@@ -337,35 +338,38 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
thisString) != 0)
{
// we're not equal if we cannot get this string
- rc = 0;
+ rc = false;
}
- else if (nonconst_rhs.get_string_value (rhsSection,
- valueName.c_str (),
- rhsString) != 0)
+ else if (nonconst_rhs.get_string_value (
+ rhsSection,
+ valueName.c_str (),
+ rhsString) != 0)
{
// we're not equal if we cannot get rhs string
- rc = 0;
+ rc = false;
}
- rc = thisString == rhsString;
+ rc = (thisString == rhsString);
}
else if (valueType == INTEGER)
{
u_int thisInt, rhsInt;
- if (nonconst_this->get_integer_value (thisSection,
- valueName.c_str (),
- thisInt) != 0)
+ if (nonconst_this->get_integer_value (
+ thisSection,
+ valueName.c_str (),
+ thisInt) != 0)
{
// we're not equal if we cannot get this int
- rc = 0;
+ rc = false;
}
- else if (nonconst_rhs.get_integer_value (rhsSection,
- valueName.c_str (),
- rhsInt) != 0)
+ else if (nonconst_rhs.get_integer_value (
+ rhsSection,
+ valueName.c_str (),
+ rhsInt) != 0)
{
// we're not equal if we cannot get rhs int
- rc = 0;
+ rc = false;
}
- rc = thisInt == rhsInt;
+ rc = (thisInt == rhsInt);
}
else if (valueType == BINARY)
{
@@ -378,23 +382,25 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
thisLength) != 0)
{
// we're not equal if we cannot get this data
- rc = 0;
+ rc = false;
}
- else if (nonconst_rhs.get_binary_value (rhsSection,
- valueName.c_str (),
- rhsData,
- rhsLength) != 0)
+ else if (nonconst_rhs.get_binary_value (
+ rhsSection,
+ valueName.c_str (),
+ rhsData,
+ rhsLength) != 0)
{
// we're not equal if we cannot get this data
- rc = 0;
+ rc = false;
}
- rc = thisLength == rhsLength;
+ rc = (thisLength == rhsLength);
// are the length's the same?
if (rc)
{
- unsigned char* thisCharData = (unsigned char*)thisData;
+ unsigned char* thisCharData =
+ (unsigned char*)thisData;
unsigned char* rhsCharData = (unsigned char*)rhsData;
// yes, then check each element
for (size_t count = 0;
@@ -407,8 +413,6 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
delete [] thisCharData;
delete [] rhsCharData;
}// end if the length's match
-
-
}
// We should never have valueTypes of INVALID, therefore
// we're not comparing them. How would we since we have
@@ -423,11 +427,10 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
// look in the rhs for values not in this
valueIndex = 0;
- while ((rc) &&
- (!nonconst_rhs.enumerate_values (rhsSection,
- valueIndex,
- valueName,
- rhsType)))
+ while ((rc) && (!nonconst_rhs.enumerate_values (rhsSection,
+ valueIndex,
+ valueName,
+ rhsType)))
{
// look for the same value in this section
if (nonconst_this->find_value (thisSection,
@@ -436,7 +439,7 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
{
// We're not equal if the same value cannot
// be found in the rhs object.
- rc = 0;
+ rc = false;
}
valueIndex++;
}// end while for rhs values not in this.
@@ -462,7 +465,7 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
thisSection) != 0)
{
// if there is some error opening the section in this object
- rc = 0;
+ rc = false;
}
else if (nonconst_rhs.open_section (rhsRoot,
sectionName.c_str (),
@@ -471,7 +474,7 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const
{
// If the rhs object does not contain the section then we
// are not equal.
- rc = 0;
+ rc = false;
}
sectionIndex++;
}
@@ -504,18 +507,18 @@ ACE_Section_Key_Win32::~ACE_Section_Key_Win32 (void)
//////////////////////////////////////////////////////////////////////////////
-int
+bool
ACE_Configuration_Win32Registry::operator== (const ACE_Configuration_Win32Registry &rhs) const
{
ACE_UNUSED_ARG (rhs);
- return 1;
+ return true;
}
-int
+bool
ACE_Configuration_Win32Registry::operator!= (const ACE_Configuration_Win32Registry &rhs) const
{
ACE_UNUSED_ARG (rhs);
- return 1;
+ return true;
}
ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey)
@@ -1241,14 +1244,14 @@ ACE_Configuration_ExtId& ACE_Configuration_ExtId::operator= (const ACE_Configura
return *this;
}
-int
-ACE_Configuration_ExtId::operator == (const ACE_Configuration_ExtId& rhs) const
+bool
+ACE_Configuration_ExtId::operator== (const ACE_Configuration_ExtId& rhs) const
{
return (ACE_OS::strcmp (name_, rhs.name_) == 0);
}
-int
-ACE_Configuration_ExtId::operator != (const ACE_Configuration_ExtId& rhs) const
+bool
+ACE_Configuration_ExtId::operator!= (const ACE_Configuration_ExtId& rhs) const
{
return (ACE_OS::strcmp (name_, rhs.name_) != 0);
}
diff --git a/ace/Configuration.h b/ace/Configuration.h
index 65c503b8e10..316156ca360 100644
--- a/ace/Configuration.h
+++ b/ace/Configuration.h
@@ -377,14 +377,14 @@ public:
* contents of the object on the right hand side.
* Returns 1 (True) if they are equal and 0 (False) if they are not equal
*/
- int operator==(const ACE_Configuration& rhs) const;
+ bool operator==(const ACE_Configuration& rhs) const;
/**
* Determine if the contents of this object are different from the
* contents of the object on the right hand side.
* Returns 0 (False) if they are equal and 1 (True) if they are not equal
*/
- int operator!=(const ACE_Configuration& rhs) const {return !(*this == rhs);}
+ bool operator!=(const ACE_Configuration& rhs) const {return !(*this == rhs);}
/**
* * Represents the "NULL" string to simplify the internal logic.
@@ -536,8 +536,8 @@ public:
static HKEY resolve_key (HKEY hKey,
const ACE_TCHAR* path,
int create = 1);
- virtual int operator== (const ACE_Configuration_Win32Registry &rhs) const;
- virtual int operator!= (const ACE_Configuration_Win32Registry &rhs) const;
+ virtual bool operator== (const ACE_Configuration_Win32Registry &rhs) const;
+ virtual bool operator!= (const ACE_Configuration_Win32Registry &rhs) const;
protected:
@@ -586,10 +586,10 @@ public:
ACE_Configuration_ExtId& operator= (const ACE_Configuration_ExtId& rhs);
/// Equality comparison operator (must match name_).
- int operator== (const ACE_Configuration_ExtId &rhs) const;
+ bool operator== (const ACE_Configuration_ExtId &rhs) const;
/// Inequality comparison operator.
- int operator!= (const ACE_Configuration_ExtId &rhs) const;
+ bool operator!= (const ACE_Configuration_ExtId &rhs) const;
/// Frees the name of the value. needed since we don't know the
/// allocator name_ was created in
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp
index 938d9fe633f..22ef667fc0a 100644
--- a/ace/Containers_T.cpp
+++ b/ace/Containers_T.cpp
@@ -17,7 +17,9 @@
#include "ace/Containers_T.i"
#endif /* __ACE_INLINE__ */
-ACE_RCSID(ace, Containers_T, "$Id$")
+ACE_RCSID (ace,
+ Containers_T,
+ "$Id$")
ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Stack)
@@ -1874,19 +1876,20 @@ ACE_DLList<T>::delete_tail (void)
// Compare this array with <s> for equality.
-template <class T> int
+template <class T> bool
ACE_Array<T>::operator== (const ACE_Array<T> &s) const
{
if (this == &s)
- return 1;
+ return true;
else if (this->size () != s.size ())
- return 0;
+ return false;
- for (size_t slot = 0; slot < s.size (); slot++)
+ const size_t len = s.size ();
+ for (size_t slot = 0; slot < len; ++slot)
if ((*this)[slot] != s[slot])
- return 0;
+ return false;
- return 1;
+ return true;
}
// ****************************************************************
diff --git a/ace/Containers_T.h b/ace/Containers_T.h
index 15762bed32a..e4cb1333d4f 100644
--- a/ace/Containers_T.h
+++ b/ace/Containers_T.h
@@ -1967,7 +1967,7 @@ public:
* if their <size>'s are equal and all the elements from 0 .. <size>
* are equal.
*/
- int operator== (const ACE_Array<T> &s) const;
+ bool operator== (const ACE_Array<T> &s) const;
///Inequality comparison operator.
/**
@@ -1975,7 +1975,7 @@ public:
* <s> is always the complement of the boolean return value of
* <*this> == <s>.
*/
- int operator!= (const ACE_Array<T> &s) const;
+ bool operator!= (const ACE_Array<T> &s) const;
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Containers_T.i b/ace/Containers_T.i
index be2bc49899c..885345ba9a8 100644
--- a/ace/Containers_T.i
+++ b/ace/Containers_T.i
@@ -301,7 +301,7 @@ ACE_Array<T>::operator= (const ACE_Array<T> &s)
// Compare this array with <s> for inequality.
-template <class T> ACE_INLINE int
+template <class T> ACE_INLINE bool
ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
{
return !(*this == s);
diff --git a/ace/DEV_Addr.h b/ace/DEV_Addr.h
index f4414673aad..11b509a9fd0 100644
--- a/ace/DEV_Addr.h
+++ b/ace/DEV_Addr.h
@@ -1,4 +1,5 @@
// -*- C++ -*-
+
//==========================================================================
/**
* @file DEV_Addr.h
@@ -57,10 +58,10 @@ public:
virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
/// Compare two addresses for equality.
- int operator == (const ACE_DEV_Addr &SAP) const;
+ bool operator == (const ACE_DEV_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_DEV_Addr &SAP) const;
+ bool operator != (const ACE_DEV_Addr &SAP) const;
/// Return the path name used for the rendezvous point.
const ACE_TCHAR *get_path_name (void) const;
diff --git a/ace/DEV_Addr.i b/ace/DEV_Addr.i
index 97bdb7b63c9..2233943ced3 100644
--- a/ace/DEV_Addr.i
+++ b/ace/DEV_Addr.i
@@ -1,5 +1,5 @@
-/* -*- C++ -*- */
-
+// -*- C++ -*-
+//
// $Id$
#include "ace/OS_NS_string.h"
@@ -39,7 +39,7 @@ ACE_DEV_Addr::get_addr (void) const
// Compare two addresses for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
{
ACE_TRACE ("ACE_DEV_Addr::operator ==");
@@ -49,7 +49,7 @@ ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
// Compare two addresses for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
{
ACE_TRACE ("ACE_DEV_Addr::operator !=");
diff --git a/ace/FILE_Addr.h b/ace/FILE_Addr.h
index 949960272f6..bcf771c2321 100644
--- a/ace/FILE_Addr.h
+++ b/ace/FILE_Addr.h
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+
//=============================================================================
/**
* @file FILE_Addr.h
@@ -58,10 +59,10 @@ public:
virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
/// Compare two addresses for equality.
- int operator == (const ACE_FILE_Addr &SAP) const;
+ bool operator == (const ACE_FILE_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_FILE_Addr &SAP) const;
+ bool operator != (const ACE_FILE_Addr &SAP) const;
/// Return the path name used for the rendezvous point.
const ACE_TCHAR *get_path_name (void) const;
diff --git a/ace/FILE_Addr.i b/ace/FILE_Addr.i
index 6acce0515b8..8db6f046434 100644
--- a/ace/FILE_Addr.i
+++ b/ace/FILE_Addr.i
@@ -1,11 +1,7 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// FILE_Addr.i
-
-// Do nothing constructor.
-
-// Transform the current address into string format.
#include "ace/SString.h"
@@ -19,7 +15,7 @@ ACE_FILE_Addr::get_addr (void) const
// Compare two addresses for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_FILE_Addr::operator == (const ACE_FILE_Addr &sap) const
{
return ACE_OS::strcmp (this->filename_, sap.filename_) == 0;
@@ -27,7 +23,7 @@ ACE_FILE_Addr::operator == (const ACE_FILE_Addr &sap) const
// Compare two addresses for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_FILE_Addr::operator != (const ACE_FILE_Addr &sap) const
{
return !((*this) == sap); // This is lazy, of course... ;-)
@@ -40,4 +36,3 @@ ACE_FILE_Addr::get_path_name (void) const
{
return this->filename_;
}
-
diff --git a/ace/Functor_T.h b/ace/Functor_T.h
index 3d477c3fc1f..21bb01be168 100644
--- a/ace/Functor_T.h
+++ b/ace/Functor_T.h
@@ -21,7 +21,7 @@
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Sergio Flores-Gaitan <sergio@cs.wustl.edu>
* @author and on STL-style functor implementations originally done by
- * @author Irfan Pyarali <irfan@cs.wustl.edu>
+ * @author Irfan Pyarali <irfan@cs.wustl.edu>
*/
//=============================================================================
@@ -89,7 +89,7 @@ class ACE_Hash
{
public:
/// Simply calls t.hash ()
- u_long operator () (const TYPE &t) const;
+ unsigned long operator () (const TYPE &t) const;
};
/**
@@ -102,7 +102,7 @@ class ACE_Pointer_Hash
{
public:
/// Simply returns t.
- u_long operator () (TYPE t) const;
+ unsigned long operator () (TYPE t) const;
};
/**
@@ -116,8 +116,8 @@ class ACE_Equal_To
{
public:
/// Simply calls operator==
- int operator () (const TYPE &lhs,
- const TYPE &rhs) const;
+ bool operator () (const TYPE &lhs,
+ const TYPE &rhs) const;
};
/**
@@ -132,8 +132,8 @@ class ACE_Less_Than
{
public:
/// Simply calls operator<
- int operator () (const TYPE &lhs,
- const TYPE &rhs) const;
+ bool operator () (const TYPE &lhs,
+ const TYPE &rhs) const;
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Functor_T.i b/ace/Functor_T.i
index eaafc07e766..1ebd950292c 100644
--- a/ace/Functor_T.i
+++ b/ace/Functor_T.i
@@ -1,37 +1,38 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-template <class TYPE> ACE_INLINE u_long
+template <class TYPE> ACE_INLINE unsigned long
ACE_Hash<TYPE>::operator () (const TYPE &t) const
{
return t.hash ();
}
-template <class TYPE> ACE_INLINE u_long
+template <class TYPE> ACE_INLINE unsigned long
ACE_Pointer_Hash<TYPE>::operator () (TYPE t) const
{
#if defined (ACE_WIN64)
// The cast below is legit... we only want a hash, and need not convert
// the hash back to a pointer.
# pragma warning(push)
-# pragma warning(disable : 4311) /* Truncate pointer to u_long */
+# pragma warning(disable : 4311) /* Truncate pointer to unsigned long */
#endif /* ACE_WIN64 */
- return ACE_reinterpret_cast (u_long, t);
+ return ACE_reinterpret_cast (unsigned long, t);
#if defined (ACE_WIN64)
# pragma warning(pop)
#endif /* ACE_WIN64 */
}
-template <class TYPE> ACE_INLINE int
+template <class TYPE> ACE_INLINE bool
ACE_Equal_To<TYPE>::operator () (const TYPE &lhs,
const TYPE &rhs) const
{
return lhs == rhs;
}
-template <class TYPE> ACE_INLINE int
+template <class TYPE> ACE_INLINE bool
ACE_Less_Than<TYPE>::operator () (const TYPE &lhs,
const TYPE &rhs) const
{
- return lhs < rhs ? 1 : 0;
+ return lhs < rhs;
}
diff --git a/ace/Future.cpp b/ace/Future.cpp
index 546e093971f..f0a1646d6ee 100644
--- a/ace/Future.cpp
+++ b/ace/Future.cpp
@@ -308,13 +308,13 @@ ACE_Future<T>::~ACE_Future (void)
FUTURE_REP::detach (future_rep_);
}
-template <class T> int
+template <class T> bool
ACE_Future<T>::operator== (const ACE_Future<T> &r) const
{
return r.future_rep_ == this->future_rep_;
}
-template <class T> int
+template <class T> bool
ACE_Future<T>::operator!= (const ACE_Future<T> &r) const
{
return r.future_rep_ != this->future_rep_;
diff --git a/ace/Future.h b/ace/Future.h
index cf361e61f0f..b6af57802f1 100644
--- a/ace/Future.h
+++ b/ace/Future.h
@@ -1,4 +1,4 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
//=============================================================================
/**
@@ -15,6 +15,7 @@
#ifndef ACE_FUTURE_H
#define ACE_FUTURE_H
+
#include /**/ "ace/pre.h"
#include "ace/Unbounded_Set.h"
@@ -64,7 +65,7 @@ protected:
* An ACE_Future_Observer object implements an object that is
* subscribed with an ACE_Future object so that it may be notified
* when the value of the ACE_Future object is written to by a writer
- * thread. It uses the Observer pattern.
+ * thread. It uses the Observer pattern.
*/
template <class T>
class ACE_Future_Observer
@@ -266,15 +267,16 @@ public:
int cancel (void);
/**
- * Equality operator that returns 1 if both ACE_Future objects
- * point to the same ACE_Future_Rep object. Attention: It also
- * returns 1 if both objects have just been instantiated and not
- * used yet.
+ * Equality operator that returns @c true if both ACE_Future objects
+ * point to the same ACE_Future_Rep object.
+ *
+ * @note It also returns @c true if both objects have just been
+ * instantiated and not used yet.
*/
- int operator == (const ACE_Future<T> &r) const;
+ bool operator == (const ACE_Future<T> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Future<T> &r) const;
+ bool operator != (const ACE_Future<T> &r) const;
/**
* Make the result available. Is used by the server thread to give
@@ -374,5 +376,7 @@ private:
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#endif /* ACE_HAS_THREADS */
+
#include /**/ "ace/post.h"
+
#endif /* ACE_FUTURE_H */
diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h
index bdd7311af96..d47ec809b27 100644
--- a/ace/Get_Opt.h
+++ b/ace/Get_Opt.h
@@ -370,7 +370,7 @@ private:
/// Default dtor.
~ACE_Get_Opt_Long_Option (void);
- int operator < (const ACE_Get_Opt_Long_Option &rhs);
+ bool operator < (const ACE_Get_Opt_Long_Option &rhs);
/// Long option name.
const ACE_TCHAR *name_;
diff --git a/ace/Get_Opt.i b/ace/Get_Opt.i
index cde18946781..f6583402b76 100644
--- a/ace/Get_Opt.i
+++ b/ace/Get_Opt.i
@@ -1,30 +1,30 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// Get_Opt.i
-ACE_INLINE int
+ACE_INLINE bool
ACE_Get_Opt::ACE_Get_Opt_Long_Option::operator < (const ACE_Get_Opt_Long_Option &rhs)
{
return this->name_ < rhs.name_;
}
ACE_INLINE int
-ACE_Get_Opt::argc (void) const
-{
- return this->argc_;
+ACE_Get_Opt::argc (void) const
+{
+ return this->argc_;
}
ACE_INLINE ACE_TCHAR **
-ACE_Get_Opt::argv (void) const
-{
- return this->argv_;
+ACE_Get_Opt::argv (void) const
+{
+ return this->argv_;
}
ACE_INLINE ACE_TCHAR*
-ACE_Get_Opt::opt_arg (void) const
-{
- return this->optarg;
+ACE_Get_Opt::opt_arg (void) const
+{
+ return this->optarg;
}
ACE_INLINE int
@@ -35,6 +35,6 @@ ACE_Get_Opt::opt_opt (void)
ACE_INLINE int &
ACE_Get_Opt::opt_ind (void)
-{
- return this->optind;
+{
+ return this->optind;
}
diff --git a/ace/Hash_Map_Manager_T.h b/ace/Hash_Map_Manager_T.h
index 1305f8574c4..33970700224 100644
--- a/ace/Hash_Map_Manager_T.h
+++ b/ace/Hash_Map_Manager_T.h
@@ -507,8 +507,8 @@ public:
ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- int operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -571,8 +571,8 @@ public:
const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- int operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -742,8 +742,8 @@ public:
ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- int operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
protected:
/// Move forward by one element in the set. Returns 0 when there's
diff --git a/ace/Hash_Map_Manager_T.i b/ace/Hash_Map_Manager_T.i
index 3a5e9613aeb..a4968cfda1d 100644
--- a/ace/Hash_Map_Manager_T.i
+++ b/ace/Hash_Map_Manager_T.i
@@ -451,7 +451,7 @@ ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>:
return *this->map_man_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
@@ -460,7 +460,7 @@ ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>:
&& this->next_ == rhs.next_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
@@ -534,7 +534,7 @@ ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_
return *this->map_man_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
@@ -543,7 +543,7 @@ ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_
&& this->next_ == rhs.next_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
@@ -788,7 +788,7 @@ ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::
return *this->map_man_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
@@ -797,7 +797,7 @@ ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::
&& this->next_ == rhs.next_;
}
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE bool
ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
{
ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
index 62f6215d5e7..aa71399a995 100644
--- a/ace/INET_Addr.cpp
+++ b/ace/INET_Addr.cpp
@@ -80,7 +80,7 @@ ACE_INET_Addr::dump (void) const
// Compare two addresses for inequality.
-int
+bool
ACE_INET_Addr::operator != (const ACE_INET_Addr &sap) const
{
ACE_TRACE ("ACE_INET_Addr::operator !=");
@@ -89,14 +89,14 @@ ACE_INET_Addr::operator != (const ACE_INET_Addr &sap) const
// Compare two addresses for equality.
-int
+bool
ACE_INET_Addr::operator == (const ACE_INET_Addr &sap) const
{
ACE_TRACE ("ACE_INET_Addr::operator ==");
- if (this->get_type () != sap.get_type () ||
- this->get_size () != sap.get_size () )
- return 0;
+ if (this->get_type () != sap.get_type ()
+ || this->get_size () != sap.get_size ())
+ return false;
return (ACE_OS::memcmp (&this->inet_addr_,
&sap.inet_addr_,
diff --git a/ace/INET_Addr.h b/ace/INET_Addr.h
index c7c2cc021e9..4c981ae681b 100644
--- a/ace/INET_Addr.h
+++ b/ace/INET_Addr.h
@@ -291,19 +291,19 @@ public:
ACE_UINT32 get_ip_address (void) const;
/**
- * Returns true if <this> is less than <rhs>. In this context,
+ * Returns @c true if @c this is less than @a rhs. In this context,
* "less than" is defined in terms of IP address and TCP port
- * number. This operator makes it possible to use <ACE_INET_Addr>s
+ * number. This operator makes it possible to use @c ACE_INET_Addrs
* in STL maps.
*/
- int operator < (const ACE_INET_Addr &rhs) const;
+ bool operator < (const ACE_INET_Addr &rhs) const;
/// Compare two addresses for equality. The addresses are considered
/// equal if they contain the same IP address and port number.
- int operator == (const ACE_INET_Addr &SAP) const;
+ bool operator == (const ACE_INET_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_INET_Addr &SAP) const;
+ bool operator != (const ACE_INET_Addr &SAP) const;
/// Computes and returns hash value.
virtual u_long hash (void) const;
diff --git a/ace/INET_Addr.i b/ace/INET_Addr.i
index 2068296ca3b..6fec9877441 100644
--- a/ace/INET_Addr.i
+++ b/ace/INET_Addr.i
@@ -1,13 +1,13 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// INET_Addr.i
#include "ace/OS_NS_string.h"
#include "ace/Global_Macros.h"
#include "ace/OS_NS_arpa_inet.h"
-// Default dtor.
+
ACE_INLINE
ACE_INET_Addr::~ACE_INET_Addr (void)
{
@@ -17,10 +17,10 @@ ACE_INLINE void
ACE_INET_Addr::reset (void)
{
ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_));
- if (this->get_type() == AF_INET)
+ if (this->get_type() == AF_INET)
this->inet_addr_.in4_.sin_family = AF_INET;
#if defined (ACE_HAS_IPV6)
- else if (this->get_type() == AF_INET6)
+ else if (this->get_type() == AF_INET6)
this->inet_addr_.in6_.sin6_family = AF_INET6;
#endif /* ACE_HAS_IPV6 */
}
@@ -129,7 +129,7 @@ ACE_INET_Addr::hash (void) const
return this->get_ip_address () + this->get_port_number ();
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_INET_Addr::operator < (const ACE_INET_Addr &rhs) const
{
return this->get_ip_address () < rhs.get_ip_address ()
@@ -183,4 +183,3 @@ ACE_INET_Addr::set_addr (void *addr, int len)
{
this->set_addr (addr, len, 0);
}
-
diff --git a/ace/IOStream.h b/ace/IOStream.h
index 87157daf602..e4df98db3d9 100644
--- a/ace/IOStream.h
+++ b/ace/IOStream.h
@@ -80,7 +80,7 @@ public:
inline ACE_Quoted_String &operator = (const char *c) {
return (ACE_Quoted_String &) ACE_IOStream_String::operator= (c);
}
- inline int operator < (const ACE_Quoted_String &s) const {
+ inline bool operator < (const ACE_Quoted_String &s) const {
return *(ACE_IOStream_String *) this < (ACE_IOStream_String) s;
}
# if defined (ACE_WIN32) && defined (_MSC_VER)
diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp
index 3511364182f..b292ce67163 100644
--- a/ace/Local_Name_Space.cpp
+++ b/ace/Local_Name_Space.cpp
@@ -96,7 +96,7 @@ ACE_NS_String::strstr (const ACE_NS_String &s) const
}
}
-int
+bool
ACE_NS_String::operator == (const ACE_NS_String &s) const
{
ACE_TRACE ("ACE_NS_String::operator ==");
@@ -105,7 +105,7 @@ ACE_NS_String::operator == (const ACE_NS_String &s) const
(void *) s.rep_, this->len_) == 0;
}
-int
+bool
ACE_NS_String::operator != (const ACE_NS_String &s) const
{
ACE_TRACE ("ACE_NS_String::operator !=");
@@ -143,7 +143,7 @@ ACE_NS_Internal::ACE_NS_Internal (ACE_NS_String &value, const char *type)
ACE_TRACE ("ACE_NS_Internal::ACE_NS_Internal");
}
-int
+bool
ACE_NS_Internal::operator == (const ACE_NS_Internal &s) const
{
ACE_TRACE ("ACE_NS_Internal::operator ==");
diff --git a/ace/Local_Name_Space.h b/ace/Local_Name_Space.h
index 88a528a894d..1651119e55e 100644
--- a/ace/Local_Name_Space.h
+++ b/ace/Local_Name_Space.h
@@ -62,10 +62,10 @@ public:
int strstr (const ACE_NS_String &) const;
/// Compare an ACE_NS_String.
- int operator == (const ACE_NS_String &) const;
+ bool operator == (const ACE_NS_String &) const;
/// Compare an ACE_NS_String.
- int operator != (const ACE_NS_String &) const;
+ bool operator != (const ACE_NS_String &) const;
/// Returns length of the string
size_t len (void) const;
@@ -104,7 +104,7 @@ public:
ACE_NS_Internal (ACE_NS_String &value, const char *type);
/// Compare an ACE_NS_Internal
- int operator == (const ACE_NS_Internal &) const;
+ bool operator == (const ACE_NS_Internal &) const;
/// Return value.
ACE_NS_String value (void);
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
index 5040f6072ea..9fe6cadfc96 100644
--- a/ace/Local_Tokens.h
+++ b/ace/Local_Tokens.h
@@ -703,7 +703,7 @@ public:
void operator= (const ACE_Token_Name &rhs);
/// Comparison.
- int operator== (const ACE_Token_Name &rhs) const;
+ bool operator== (const ACE_Token_Name &rhs) const;
/// Get the token name.
const ACE_TCHAR *name (void) const;
diff --git a/ace/Local_Tokens.i b/ace/Local_Tokens.i
index 01594e0dec2..5fed1b6c025 100644
--- a/ace/Local_Tokens.i
+++ b/ace/Local_Tokens.i
@@ -380,7 +380,7 @@ ACE_Local_RLock::type (void) const
ACE_INLINE ACE_Token_Proxy *
ACE_Local_RLock::clone (void) const
{
- ACE_Token_Proxy *temp = 0;
+ ACE_Token_Proxy *temp = 0;
ACE_NEW_RETURN (temp,
ACE_Local_RLock (token_->name (),
ignore_deadlock_,
@@ -446,7 +446,7 @@ ACE_Token_Name::operator= (const ACE_Token_Name &rhs)
this->name (rhs.name ());
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Token_Name::operator== (const ACE_Token_Name &rhs) const
{
ACE_TRACE ("ACE_Token_Name::operator==");
diff --git a/ace/MEM_Addr.h b/ace/MEM_Addr.h
index efd5f3d6b76..3cb365fc78d 100644
--- a/ace/MEM_Addr.h
+++ b/ace/MEM_Addr.h
@@ -119,12 +119,12 @@ public:
/// Compare two addresses for equality. The addresses are considered
/// equal if they contain the same IP address and port number.
- int operator == (const ACE_MEM_Addr &SAP) const;
- int operator == (const ACE_INET_Addr &SAP) const;
+ bool operator == (const ACE_MEM_Addr &SAP) const;
+ bool operator == (const ACE_INET_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_MEM_Addr &SAP) const;
- int operator != (const ACE_INET_Addr &SAP) const;
+ bool operator != (const ACE_MEM_Addr &SAP) const;
+ bool operator != (const ACE_INET_Addr &SAP) const;
/// Computes and returns hash value.
virtual u_long hash (void) const;
diff --git a/ace/MEM_Addr.i b/ace/MEM_Addr.i
index d5b42015724..9ebf3cced94 100644
--- a/ace/MEM_Addr.i
+++ b/ace/MEM_Addr.i
@@ -1,11 +1,11 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// MEM_Addr.i
#include "ace/Global_Macros.h"
-// Default dtor.
+
ACE_INLINE
ACE_MEM_Addr::~ACE_MEM_Addr (void)
{
@@ -79,7 +79,7 @@ ACE_MEM_Addr::get_remote_addr (void) const
// Compare two addresses for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_MEM_Addr::operator == (const ACE_MEM_Addr &sap) const
{
ACE_TRACE ("ACE_MEM_Addr::operator ==");
@@ -88,7 +88,7 @@ ACE_MEM_Addr::operator == (const ACE_MEM_Addr &sap) const
this->internal_ == sap.internal_;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_MEM_Addr::operator == (const ACE_INET_Addr &sap) const
{
ACE_TRACE ("ACE_MEM_Addr::operator ==");
@@ -98,14 +98,14 @@ ACE_MEM_Addr::operator == (const ACE_INET_Addr &sap) const
// Compare two addresses for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_MEM_Addr::operator != (const ACE_MEM_Addr &sap) const
{
ACE_TRACE ("ACE_MEM_Addr::operator !=");
return !((*this) == sap);
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_MEM_Addr::operator != (const ACE_INET_Addr &sap) const
{
ACE_TRACE ("ACE_MEM_Addr::operator !=");
diff --git a/ace/Map_Manager.h b/ace/Map_Manager.h
index 48db1161f33..acd447d45eb 100644
--- a/ace/Map_Manager.h
+++ b/ace/Map_Manager.h
@@ -470,8 +470,8 @@ public:
ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
- int operator!= (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
+ bool operator== (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
+ bool operator!= (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -529,8 +529,8 @@ public:
const ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void) const;
/// Check if two iterators point to the same position
- int operator== (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
- int operator!= (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
+ bool operator== (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
+ bool operator!= (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
diff --git a/ace/Map_Manager.i b/ace/Map_Manager.i
index f31a419eb46..e58a77fc6a1 100644
--- a/ace/Map_Manager.i
+++ b/ace/Map_Manager.i
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
#include "ace/Guard_T.h"
@@ -360,14 +361,14 @@ ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::map (void)
return *this->map_man_;
}
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE bool
ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator== (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
{
return (this->map_man_ == rhs.map_man_ &&
this->next_ == rhs.next_);
}
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE bool
ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator!= (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
{
return !this->operator== (rhs);
@@ -467,14 +468,14 @@ ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::map (void) const
return *this->map_man_;
}
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE bool
ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator== (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
{
return (this->map_man_ == rhs.map_man_ &&
this->next_ == rhs.next_);
}
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
+template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE bool
ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator!= (const ACE_Map_Const_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
{
return !this->operator== (rhs);
diff --git a/ace/Map_T.h b/ace/Map_T.h
index 35d7baa5e14..be6c51797fa 100644
--- a/ace/Map_T.h
+++ b/ace/Map_T.h
@@ -161,8 +161,8 @@ public:
ACE_Iterator<T> &operator= (const ACE_Iterator<T> &rhs);
/// Comparison operators.
- int operator== (const ACE_Iterator<T> &rhs) const;
- int operator!= (const ACE_Iterator<T> &rhs) const;
+ bool operator== (const ACE_Iterator<T> &rhs) const;
+ bool operator!= (const ACE_Iterator<T> &rhs) const;
/// Dereference operator.
T operator *() const;
@@ -216,9 +216,15 @@ public:
/// Assignment operator.
ACE_Reverse_Iterator<T> &operator= (const ACE_Reverse_Iterator<T> &rhs);
- /// Comparison operators.
- int operator== (const ACE_Reverse_Iterator<T> &rhs) const;
- int operator!= (const ACE_Reverse_Iterator<T> &rhs) const;
+ /**
+ * @name Comparison Operators
+ *
+ * The usual equality operators.
+ */
+ //@{
+ bool operator== (const ACE_Reverse_Iterator<T> &rhs) const;
+ bool operator!= (const ACE_Reverse_Iterator<T> &rhs) const;
+ //@}
/// Dereference operator.
T operator *() const;
diff --git a/ace/Map_T.i b/ace/Map_T.i
index c279bca0446..e786e1de5bf 100644
--- a/ace/Map_T.i
+++ b/ace/Map_T.i
@@ -62,13 +62,13 @@ ACE_Iterator<T>::operator= (const ACE_Iterator<T> &rhs)
return *this;
}
-template <class T> ACE_INLINE int
+template <class T> ACE_INLINE bool
ACE_Iterator<T>::operator== (const ACE_Iterator<T> &rhs) const
{
return this->implementation_->compare (*rhs.implementation_);
}
-template <class T> ACE_INLINE int
+template <class T> ACE_INLINE bool
ACE_Iterator<T>::operator!= (const ACE_Iterator<T> &rhs) const
{
return !this->operator== (rhs);
@@ -142,13 +142,13 @@ ACE_Reverse_Iterator<T>::operator= (const ACE_Reverse_Iterator<T> &rhs)
return *this;
}
-template <class T> ACE_INLINE int
+template <class T> ACE_INLINE bool
ACE_Reverse_Iterator<T>::operator== (const ACE_Reverse_Iterator<T> &rhs) const
{
return this->implementation_->compare (*rhs.implementation_);
}
-template <class T> ACE_INLINE int
+template <class T> ACE_INLINE bool
ACE_Reverse_Iterator<T>::operator!= (const ACE_Reverse_Iterator<T> &rhs) const
{
return !this->operator== (rhs);
diff --git a/ace/Name_Space.cpp b/ace/Name_Space.cpp
index 882fb2dbdc6..b3939f4095e 100644
--- a/ace/Name_Space.cpp
+++ b/ace/Name_Space.cpp
@@ -52,7 +52,7 @@ ACE_Name_Binding::operator = (const ACE_Name_Binding &s)
}
}
-int
+bool
ACE_Name_Binding::operator == (const ACE_Name_Binding &s) const
{
ACE_TRACE ("ACE_Name_Binding::operator ==");
diff --git a/ace/Name_Space.h b/ace/Name_Space.h
index 680deb5a492..aedaf801276 100644
--- a/ace/Name_Space.h
+++ b/ace/Name_Space.h
@@ -54,7 +54,7 @@ public:
~ACE_Name_Binding (void);
/// Test for equality.
- int operator == (const ACE_Name_Binding &s) const;
+ bool operator == (const ACE_Name_Binding &s) const;
/// Name of the binding.
ACE_NS_WString name_;
diff --git a/ace/OS_Errno.h b/ace/OS_Errno.h
index 1bfb886d204..5ab0d2f2492 100644
--- a/ace/OS_Errno.h
+++ b/ace/OS_Errno.h
@@ -100,10 +100,10 @@ public:
int operator= (int error);
/// Compare <error> with <error_> for equality.
- int operator== (int error);
+ bool operator== (int error);
/// Compare <error> with <error_> for inequality.
- int operator!= (int error);
+ bool operator!= (int error);
private:
#if defined (ACE_MT_SAFE)
diff --git a/ace/OS_Errno.inl b/ace/OS_Errno.inl
index 1fb222075be..67ef64f3d5c 100644
--- a/ace/OS_Errno.inl
+++ b/ace/OS_Errno.inl
@@ -74,13 +74,13 @@ ACE_Errno_Guard::operator= (int error)
return this->error_ = error;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Errno_Guard::operator== (int error)
{
return this->error_ == error;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Errno_Guard::operator!= (int error)
{
return this->error_ != error;
diff --git a/ace/OS_NS_Thread.cpp b/ace/OS_NS_Thread.cpp
index 0354d5a91c1..032df13d710 100644
--- a/ace/OS_NS_Thread.cpp
+++ b/ace/OS_NS_Thread.cpp
@@ -188,14 +188,14 @@ ACE_Thread_ID::to_string (char* thr_id)
#endif /* ACE_WIN32 */
}
-int
+bool
ACE_Thread_ID::operator== (const ACE_Thread_ID &rhs) const
{
return ACE_OS::thr_cmp (this->thread_handle_, rhs.thread_handle_) == 0
&& ACE_OS::thr_equal (this->thread_id_, rhs.thread_id_) == 0;
}
-int
+bool
ACE_Thread_ID::operator!= (const ACE_Thread_ID &rhs) const
{
return !(*this == rhs);
@@ -475,7 +475,7 @@ ACE_TSS_Ref::ACE_TSS_Ref (void)
}
// Check for equality.
-int
+bool
ACE_TSS_Ref::operator== (const ACE_TSS_Ref &info) const
{
ACE_OS_TRACE ("ACE_TSS_Ref::operator==");
@@ -485,7 +485,7 @@ ACE_TSS_Ref::operator== (const ACE_TSS_Ref &info) const
// Check for inequality.
ACE_SPECIAL_INLINE
-int
+bool
ACE_TSS_Ref::operator != (const ACE_TSS_Ref &tss_ref) const
{
ACE_OS_TRACE ("ACE_TSS_Ref::operator !=");
@@ -518,21 +518,21 @@ ACE_TSS_Info::ACE_TSS_Info (void)
}
# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
-static inline int operator== (const ACE_thread_key_t &lhs,
- const ACE_thread_key_t &rhs)
+static inline bool operator== (const ACE_thread_key_t &lhs,
+ const ACE_thread_key_t &rhs)
{
return ! ACE_OS::memcmp (&lhs, &rhs, sizeof (ACE_thread_key_t));
}
-static inline int operator!= (const ACE_thread_key_t &lhs,
- const ACE_thread_key_t &rhs)
+static inline bool operator!= (const ACE_thread_key_t &lhs,
+ const ACE_thread_key_t &rhs)
{
return ! (lhs == rhs);
}
# endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */
// Check for equality.
-int
+bool
ACE_TSS_Info::operator== (const ACE_TSS_Info &info) const
{
ACE_OS_TRACE ("ACE_TSS_Info::operator==");
@@ -541,7 +541,7 @@ ACE_TSS_Info::operator== (const ACE_TSS_Info &info) const
}
// Check for inequality.
-int
+bool
ACE_TSS_Info::operator != (const ACE_TSS_Info &info) const
{
ACE_OS_TRACE ("ACE_TSS_Info::operator !=");
diff --git a/ace/OS_NS_Thread.h b/ace/OS_NS_Thread.h
index 473e0b8a298..da0f0b9ae3b 100644
--- a/ace/OS_NS_Thread.h
+++ b/ace/OS_NS_Thread.h
@@ -720,8 +720,8 @@ public:
// != Comparison operator.
- int operator== (const ACE_Thread_ID &) const;
- int operator!= (const ACE_Thread_ID &) const;
+ bool operator== (const ACE_Thread_ID &) const;
+ bool operator!= (const ACE_Thread_ID &) const;
private:
/// Identify the thread.
@@ -921,10 +921,10 @@ public:
ACE_TSS_Ref (void);
/// Check for equality.
- int operator== (const ACE_TSS_Ref &) const;
+ bool operator== (const ACE_TSS_Ref &) const;
/// Check for inequality.
- int operator!= (const ACE_TSS_Ref &) const;
+ bool operator!= (const ACE_TSS_Ref &) const;
// private:
@@ -958,10 +958,10 @@ public:
void key_in_use (int flag) { thread_count_ = flag == 0 ? -1 : 1; }
/// Check for equality.
- int operator== (const ACE_TSS_Info &) const;
+ bool operator== (const ACE_TSS_Info &) const;
/// Check for inequality.
- int operator!= (const ACE_TSS_Info &) const;
+ bool operator!= (const ACE_TSS_Info &) const;
/// Dump the state.
void dump (void);
diff --git a/ace/Pair_T.h b/ace/Pair_T.h
index 044a8c618f9..4ded87dbfcf 100644
--- a/ace/Pair_T.h
+++ b/ace/Pair_T.h
@@ -60,7 +60,7 @@ public:
void second (const T2 &t2);
// Compare pairs.
- int operator== (const ACE_Pair<T1, T2> &rhs) const;
+ bool operator== (const ACE_Pair<T1, T2> &rhs) const;
protected:
/// First.
@@ -99,7 +99,7 @@ public:
T2 &second (void) const;
// Compare pairs.
- int operator== (const ACE_Reference_Pair<T1, T2> &rhs) const;
+ bool operator== (const ACE_Reference_Pair<T1, T2> &rhs) const;
protected:
/// First.
diff --git a/ace/Pair_T.i b/ace/Pair_T.i
index 9833346856d..dafbb222cca 100644
--- a/ace/Pair_T.i
+++ b/ace/Pair_T.i
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+//
// $Id$
template <class T1, class T2> ACE_INLINE
@@ -49,7 +51,7 @@ ACE_Pair<T1, T2>::second (const T2 &t2)
this->second_ = t2;
}
-template <class T1, class T2> ACE_INLINE int
+template <class T1, class T2> ACE_INLINE bool
ACE_Pair<T1, T2>::operator== (const ACE_Pair<T1, T2> &rhs) const
{
return (this->first_ == rhs.first_ &&
@@ -76,7 +78,7 @@ ACE_Reference_Pair<T1, T2>::second (void) const
return this->second_;
}
-template <class T1, class T2> ACE_INLINE int
+template <class T1, class T2> ACE_INLINE bool
ACE_Reference_Pair<T1, T2>::operator== (const ACE_Reference_Pair<T1, T2> &rhs) const
{
return (this->first_ == rhs.first_ &&
diff --git a/ace/RB_Tree.h b/ace/RB_Tree.h
index f9c31f302c7..4d7cfa852fd 100644
--- a/ace/RB_Tree.h
+++ b/ace/RB_Tree.h
@@ -575,10 +575,10 @@ public:
const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree (void);
/// Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
- int operator== (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator== (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
/// Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
- int operator!= (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
+ bool operator!= (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -790,9 +790,9 @@ public:
int set_last = 1);
/**
- * Constructor. Takes an ACE_RB_Tree over which to iterate, and
+ * Constructor. Takes an ACE_RB_Tree over which to iterate, and
* a point to a node in the tree.
- */
+ */
ACE_RB_Tree_Reverse_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree,
ACE_RB_Tree_Node<EXT_ID, INT_ID>* entry);
diff --git a/ace/RB_Tree.i b/ace/RB_Tree.i
index 65ee125c62b..d5a83c3e61f 100644
--- a/ace/RB_Tree.i
+++ b/ace/RB_Tree.i
@@ -764,24 +764,24 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree (void)
// Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
+ACE_INLINE bool
ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
(const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
{
ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==");
- return (this->node_ == rbt.node_) ? 1 : 0;
+ return (this->node_ == rbt.node_) ? true : false;
}
// Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
+ACE_INLINE bool
ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
(const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
{
ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=");
- return (this->node_ == rbt.node_) ? 0 : 1;
+ return (this->node_ == rbt.node_) ? false : true;
}
diff --git a/ace/Refcounted_Auto_Ptr.h b/ace/Refcounted_Auto_Ptr.h
index c6b6910b12f..f270cbb6bf1 100644
--- a/ace/Refcounted_Auto_Ptr.h
+++ b/ace/Refcounted_Auto_Ptr.h
@@ -58,15 +58,17 @@ public:
/// is created if necessary.
void operator = (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r);
- /// Equality operator that returns 1 if both
- /// ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> objects point to the same
- /// ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object. Attention: It
- /// also returns 1 if both objects have just been instantiated and
- /// not used yet.
- int operator == (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const;
+ /// Equality operator that returns @c true if both
+ /// ACE_Refcounted_Auto_Ptr@<X, ACE_LOCK@> objects point to the same
+ /// ACE_Refcounted_Auto_Ptr_Rep@<X, ACE_LOCK@> object
+ /**
+ * @note It also returns @c true if both objects have just been
+ * instantiated and not used yet.
+ */
+ bool operator == (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const;
/// Inequality operator, which is the opposite of equality.
- int operator != (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const;
+ bool operator != (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const;
/// Redirection operator
X *operator-> (void) const;
@@ -77,7 +79,7 @@ public:
/// Sets the pointer value to 0 and returns its old value.
X *release (void);
-
+
/// Invokes delete on the previous pointer value and then sets the
/// pointer value to the specified value.
void reset (X *p = 0);
@@ -89,7 +91,7 @@ public:
int count (void) const;
// = Utility method.
-
+
/// Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects.
int null (void) const;
@@ -110,7 +112,7 @@ protected:
* @brief An ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object
* encapsulates a pointer to an object of type X. It is pointed to by
* ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> object[s] and only accessible
- * through them.
+ * through them.
*/
template <class X, class ACE_LOCK>
class ACE_Refcounted_Auto_Ptr_Rep
@@ -189,4 +191,3 @@ private:
#include /**/ "ace/post.h"
#endif /* ACE_REFCOUNTED_AUTO_PTR_H */
-
diff --git a/ace/Refcounted_Auto_Ptr.i b/ace/Refcounted_Auto_Ptr.i
index 5e8f5d0dc5a..256a5caa7e4 100644
--- a/ace/Refcounted_Auto_Ptr.i
+++ b/ace/Refcounted_Auto_Ptr.i
@@ -1,9 +1,8 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// Refcounted_Auto_Ptr.i
-
-#include "ace/Synch_T.h"
+#include "ace/Guard_T.h"
#include "ace/Log_Msg.h"
template <class X, class ACE_LOCK> inline int
@@ -165,13 +164,13 @@ ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::~ACE_Refcounted_Auto_Ptr (void)
AUTO_REFCOUNTED_PTR_REP::detach (rep_);
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator== (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const
{
return r.rep_ == this->rep_;
}
-template <class X, class ACE_LOCK> inline int
+template <class X, class ACE_LOCK> inline bool
ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator!= (const ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r) const
{
return r.rep_ != this->rep_;
@@ -220,4 +219,3 @@ ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator = (const ACE_Refcounted_Auto_Ptr<
AUTO_REFCOUNTED_PTR_REP::assign (this->rep_,
AUTO_REFCOUNTED_PTR_REP::attach (r.rep_));
}
-
diff --git a/ace/Registry.cpp b/ace/Registry.cpp
index 9e2d0dff25b..dca6e14d0d2 100644
--- a/ace/Registry.cpp
+++ b/ace/Registry.cpp
@@ -2,7 +2,9 @@
#include "ace/Registry.h"
-ACE_RCSID(ace, Registry, "$Id$")
+ACE_RCSID (ace,
+ Registry,
+ "$Id$")
#if defined (ACE_WIN32)
@@ -26,7 +28,7 @@ ACE_RCSID(ace, Registry, "$Id$")
/* static */
const ACE_TCHAR *ACE_Registry::STRING_SEPARATOR = ACE_LIB_TEXT ("\\");
-int
+bool
ACE_Registry::Name_Component::operator== (const Name_Component &rhs) const
{
return
@@ -34,7 +36,7 @@ ACE_Registry::Name_Component::operator== (const Name_Component &rhs) const
rhs.kind_ == this->kind_;
}
-int
+bool
ACE_Registry::Name_Component::operator!= (const Name_Component &rhs) const
{
return !this->operator== (rhs);
@@ -68,7 +70,7 @@ ACE_Registry::Binding::Binding (const ACE_TString &name,
}
-int
+bool
ACE_Registry::Binding::operator== (const Binding &rhs) const
{
return
@@ -76,7 +78,7 @@ ACE_Registry::Binding::operator== (const Binding &rhs) const
rhs.type_ == this->type_;
}
-int
+bool
ACE_Registry::Binding::operator!= (const Binding &rhs) const
{
return !this->operator== (rhs);
diff --git a/ace/Registry.h b/ace/Registry.h
index e163d4e9592..0d4f74c8a7e 100644
--- a/ace/Registry.h
+++ b/ace/Registry.h
@@ -49,8 +49,8 @@ public:
ACE_TString id_;
ACE_TString kind_;
- int operator== (const Name_Component &rhs) const;
- int operator!= (const Name_Component &rhs) const;
+ bool operator== (const Name_Component &rhs) const;
+ bool operator!= (const Name_Component &rhs) const;
// Comparison
};
// The <id_> field is used,
@@ -86,8 +86,8 @@ public:
Binding (const ACE_TString &binding_name,
Binding_Type binding_type);
- int operator== (const Binding &rhs) const;
- int operator!= (const Binding &rhs) const;
+ bool operator== (const Binding &rhs) const;
+ bool operator!= (const Binding &rhs) const;
// Comparison
/// Name accessor
diff --git a/ace/SPIPE_Addr.h b/ace/SPIPE_Addr.h
index 3c4852a2e05..58a52164c99 100644
--- a/ace/SPIPE_Addr.h
+++ b/ace/SPIPE_Addr.h
@@ -65,10 +65,10 @@ public:
// = Equality/inequality tests
/// Check for equality.
- int operator == (const ACE_SPIPE_Addr &SAP) const;
+ bool operator == (const ACE_SPIPE_Addr &SAP) const;
/// Check for inequality
- int operator != (const ACE_SPIPE_Addr &SAP) const;
+ bool operator != (const ACE_SPIPE_Addr &SAP) const;
// = SPIPE-specific address operations
/// Pathname of rendezvous point in file system.
diff --git a/ace/SPIPE_Addr.i b/ace/SPIPE_Addr.i
index e6af565b53b..32b83289359 100644
--- a/ace/SPIPE_Addr.i
+++ b/ace/SPIPE_Addr.i
@@ -1,11 +1,10 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// SPIPE_Addr.i
#include "ace/SString.h"
-// Transform the current address into string format.
ACE_INLINE int
ACE_SPIPE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
@@ -26,7 +25,7 @@ ACE_SPIPE_Addr::get_addr (void) const
// Compare two addresses for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const
{
return ACE_OS::strcmp (this->SPIPE_addr_.rendezvous_,
@@ -35,7 +34,7 @@ ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const
// Compare two addresses for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SPIPE_Addr::operator != (const ACE_SPIPE_Addr &sap) const
{
return !((*this) == sap); // This is lazy, of course... ;-)
diff --git a/ace/SString.h b/ace/SString.h
index a6f81eed101..123568c46c0 100644
--- a/ace/SString.h
+++ b/ace/SString.h
@@ -203,16 +203,16 @@ public:
int rfind (char c, int pos = npos) const;
/// Equality comparison operator (must match entire string).
- int operator == (const ACE_SString &s) const;
+ bool operator == (const ACE_SString &s) const;
/// Less than comparison operator.
- int operator < (const ACE_SString &s) const;
+ bool operator < (const ACE_SString &s) const;
/// Greater than comparison operator.
- int operator > (const ACE_SString &s) const;
+ bool operator > (const ACE_SString &s) const;
/// Inequality comparison operator.
- int operator != (const ACE_SString &s) const;
+ bool operator != (const ACE_SString &s) const;
/// Performs a <strcmp>-style comparison.
int compare (const ACE_SString &s) const;
diff --git a/ace/SString.i b/ace/SString.i
index 3c17ddca7a6..2787bf8b0d9 100644
--- a/ace/SString.i
+++ b/ace/SString.i
@@ -117,7 +117,7 @@ ACE_SString::c_str (void) const
// Comparison operator.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SString::operator== (const ACE_SString &s) const
{
ACE_TRACE ("ACE_SString::operator==");
@@ -127,31 +127,31 @@ ACE_SString::operator== (const ACE_SString &s) const
// Less than comparison operator.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SString::operator < (const ACE_SString &s) const
{
ACE_TRACE ("ACE_SString::operator <");
return (this->rep_ && s.rep_)
? ACE_OS::strcmp (this->rep_, s.rep_) < 0
- : ((s.rep_) ? 1 : 0 );
+ : ((s.rep_) ? true : false);
}
// Greater than comparison operator.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SString::operator > (const ACE_SString &s) const
{
ACE_TRACE ("ACE_SString::operator >");
return (this->rep_ && s.rep_)
? ACE_OS::strcmp (this->rep_, s.rep_) > 0
- : ((this->rep_) ? 1 : 0 );
+ : ((this->rep_) ? true : false );
}
// Comparison operator.
-ACE_INLINE int
+ACE_INLINE bool
ACE_SString::operator!= (const ACE_SString &s) const
{
ACE_TRACE ("ACE_SString::operator!=");
diff --git a/ace/Select_Reactor_Base.h b/ace/Select_Reactor_Base.h
index 5deb5b6d042..8ad0fd239b0 100644
--- a/ace/Select_Reactor_Base.h
+++ b/ace/Select_Reactor_Base.h
@@ -87,10 +87,10 @@ public:
~ACE_Event_Tuple (void);
/// Equality operator.
- int operator== (const ACE_Event_Tuple &rhs) const;
+ bool operator== (const ACE_Event_Tuple &rhs) const;
/// Inequality operator.
- int operator!= (const ACE_Event_Tuple &rhs) const;
+ bool operator!= (const ACE_Event_Tuple &rhs) const;
/// Handle.
ACE_HANDLE handle_;
diff --git a/ace/Select_Reactor_Base.i b/ace/Select_Reactor_Base.i
index f04446e2e86..73c4b7faa21 100644
--- a/ace/Select_Reactor_Base.i
+++ b/ace/Select_Reactor_Base.i
@@ -44,13 +44,13 @@ ACE_Event_Tuple::ACE_Event_Tuple (ACE_Event_Handler* eh,
{
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Event_Tuple::operator== (const ACE_Event_Tuple &rhs) const
{
return this->handle_ == rhs.handle_;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Event_Tuple::operator!= (const ACE_Event_Tuple &rhs) const
{
return !(*this == rhs);
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
index 809eb416d8e..e8b746369c1 100644
--- a/ace/Service_Config.h
+++ b/ace/Service_Config.h
@@ -80,10 +80,10 @@ public:
public:
/// Compare two service descriptors for equality.
- int operator== (ACE_Static_Svc_Descriptor &) const;
+ bool operator== (ACE_Static_Svc_Descriptor &) const;
/// Compare two service descriptors for inequality.
- int operator!= (ACE_Static_Svc_Descriptor &) const;
+ bool operator!= (ACE_Static_Svc_Descriptor &) const;
};
// Maintain a set of the statically linked service descriptors.
diff --git a/ace/Service_Config.i b/ace/Service_Config.i
index 1b004fcf24d..3884ab7da34 100644
--- a/ace/Service_Config.i
+++ b/ace/Service_Config.i
@@ -46,7 +46,7 @@ ACE_Service_Config::open (int argc,
// Compare two service descriptors for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_Static_Svc_Descriptor::operator== (ACE_Static_Svc_Descriptor &d) const
{
return ACE_OS::strcmp (name_, d.name_) == 0;
@@ -54,7 +54,7 @@ ACE_Static_Svc_Descriptor::operator== (ACE_Static_Svc_Descriptor &d) const
// Compare two service descriptors for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_Static_Svc_Descriptor::operator!= (ACE_Static_Svc_Descriptor &d) const
{
return !(*this == d);
diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h
index ed72a28547a..cc89e66eef7 100644
--- a/ace/Strategies_T.h
+++ b/ace/Strategies_T.h
@@ -800,8 +800,8 @@ public:
virtual ~ACE_Refcounted_Hash_Recyclable (void);
/// Compares two instances.
- int operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
- int operator!= (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
+ bool operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
+ bool operator!= (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
T &subject ();
diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i
index 41582fc6e95..9a91518d359 100644
--- a/ace/Strategies_T.i
+++ b/ace/Strategies_T.i
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
template<class SVC_HANDLER> ASYS_INLINE
@@ -382,14 +383,15 @@ ACE_Refcounted_Hash_Recyclable<T>::subject (void)
return this->t_;
}
-template <class T> ASYS_INLINE int
+template <class T> ASYS_INLINE bool
ACE_Refcounted_Hash_Recyclable<T>::operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const
{
- return this->recycle_state () == rhs.recycle_state () &&
- this->t_ == rhs.t_;
+ return
+ this->recycle_state () == rhs.recycle_state ()
+ && this->t_ == rhs.t_;
}
-template <class T> ASYS_INLINE int
+template <class T> ASYS_INLINE bool
ACE_Refcounted_Hash_Recyclable<T>::operator!= (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const
{
return !this->operator== (rhs);
diff --git a/ace/String_Base.cpp b/ace/String_Base.cpp
index 623c5f1aa87..a1c5afbc2c0 100644
--- a/ace/String_Base.cpp
+++ b/ace/String_Base.cpp
@@ -121,7 +121,7 @@ ACE_String_Base<CHAR>::operator+= (const ACE_String_Base<CHAR> &s)
if (s.len_ > 0)
{
- size_t new_buf_len = this->len_ + s.len_ + 1;
+ const size_t new_buf_len = this->len_ + s.len_ + 1;
// case 1. No memory allocation needed.
if (this->buf_len_ >= new_buf_len)
diff --git a/ace/String_Base.h b/ace/String_Base.h
index b4afab07731..a134c11f80a 100644
--- a/ace/String_Base.h
+++ b/ace/String_Base.h
@@ -314,35 +314,36 @@ public:
* Equality comparison operator (must match entire string).
*
* @param s Input ACE_String_Base string to compare against stored string.
- * @return Integer value of result (1 = found, 0 = not found).
+ * @return Integer value of result (@c true = found, @c false = not
+ * found).
*/
- int operator == (const ACE_String_Base<CHAR> &s) const;
+ bool operator == (const ACE_String_Base<CHAR> &s) const;
/**
* Less than comparison operator.
*
* @param s Input ACE_String_Base string to compare against stored string.
- * @return Integer value of result (1 = less than, 0 = greater than or
- * equal).
+ * @return Integer value of result (@c true = less than, @c false =
+ * greater than or equal).
*/
- int operator < (const ACE_String_Base<CHAR> &s) const;
+ bool operator < (const ACE_String_Base<CHAR> &s) const;
/**
* Greater than comparison operator.
*
* @param s Input ACE_String_Base string to compare against stored string.
- * @return Integer value of result (1 = greater than, 0 = less than or
- * equal).
+ * @return Integer value of result (@c true = greater than, @c
+ * false = less than or equal).
*/
- int operator > (const ACE_String_Base<CHAR> &s) const;
+ bool operator > (const ACE_String_Base<CHAR> &s) const;
/**
* Inequality comparison operator.
*
* @param s Input ACE_String_Base string to compare against stored string.
- * @return Integer value of result (1 = not equal, 0 = equal).
+ * @return Integer value of result (@c true = not equal, @c false = equal).
*/
- int operator != (const ACE_String_Base<CHAR> &s) const;
+ bool operator != (const ACE_String_Base<CHAR> &s) const;
/**
* Performs a strncmp comparison.
diff --git a/ace/String_Base.i b/ace/String_Base.i
index af13ef5d50f..7f0bded8193 100644
--- a/ace/String_Base.i
+++ b/ace/String_Base.i
@@ -239,7 +239,7 @@ ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const
// Comparison operator.
-template <class CHAR> ACE_INLINE int
+template <class CHAR> ACE_INLINE bool
ACE_String_Base<CHAR>::operator== (const ACE_String_Base<CHAR> &s) const
{
ACE_TRACE ("ACE_String_Base<CHAR>::operator==");
@@ -249,7 +249,7 @@ ACE_String_Base<CHAR>::operator== (const ACE_String_Base<CHAR> &s) const
// Less than comparison operator.
-template <class CHAR> ACE_INLINE int
+template <class CHAR> ACE_INLINE bool
ACE_String_Base<CHAR>::operator < (const ACE_String_Base<CHAR> &s) const
{
ACE_TRACE ("ACE_String_Base<CHAR>::operator <");
@@ -258,7 +258,7 @@ ACE_String_Base<CHAR>::operator < (const ACE_String_Base<CHAR> &s) const
// Greater than comparison operator.
-template <class CHAR> ACE_INLINE int
+template <class CHAR> ACE_INLINE bool
ACE_String_Base<CHAR>::operator > (const ACE_String_Base &s) const
{
ACE_TRACE ("ACE_String_Base<CHAR>::operator >");
@@ -268,7 +268,7 @@ ACE_String_Base<CHAR>::operator > (const ACE_String_Base &s) const
// Comparison operator.
-template <class CHAR> ACE_INLINE int
+template <class CHAR> ACE_INLINE bool
ACE_String_Base<CHAR>::operator!= (const ACE_String_Base<CHAR> &s) const
{
ACE_TRACE ("ACE_String_Base<CHAR>::operator!=");
diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h
index 1fd4118255b..66d41769eb9 100644
--- a/ace/Thread_Manager.h
+++ b/ace/Thread_Manager.h
@@ -178,10 +178,10 @@ public:
// = We need the following operators to make Borland happy.
/// Equality operator.
- int operator== (const ACE_Thread_Descriptor_Base &rhs) const;
+ bool operator== (const ACE_Thread_Descriptor_Base &rhs) const;
/// Inequality operator.
- int operator!= (const ACE_Thread_Descriptor_Base &rhs) const;
+ bool operator!= (const ACE_Thread_Descriptor_Base &rhs) const;
/// Group ID.
int grp_id (void) const;
diff --git a/ace/Thread_Manager.i b/ace/Thread_Manager.i
index 4a49398eaab..5f3f9f714cb 100644
--- a/ace/Thread_Manager.i
+++ b/ace/Thread_Manager.i
@@ -96,14 +96,14 @@ ACE_Thread_Descriptor_Base::~ACE_Thread_Descriptor_Base (void)
{
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Thread_Descriptor_Base::operator==(const ACE_Thread_Descriptor_Base &rhs) const
{
return ACE_OS::thr_cmp (this->thr_handle_, rhs.thr_handle_) == 0
&& ACE_OS::thr_equal (this->thr_id_, rhs.thr_id_) == 0;
}
-ACE_INLINE int
+ACE_INLINE bool
ACE_Thread_Descriptor_Base::operator!=(const ACE_Thread_Descriptor_Base &rhs) const
{
return !(*this == rhs);
diff --git a/ace/Time_Value.h b/ace/Time_Value.h
index 59ea5ed931f..0d16beb82ee 100644
--- a/ace/Time_Value.h
+++ b/ace/Time_Value.h
@@ -255,28 +255,28 @@ public:
const ACE_Time_Value &tv2);
/// True if @a tv1 < @a tv2.
- friend ACE_Export int operator < (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator < (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
/// True if @a tv1 > @a tv2.
- friend ACE_Export int operator > (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator > (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
/// True if @a tv1 <= @a tv2.
- friend ACE_Export int operator <= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator <= (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
/// True if @a tv1 >= @a tv2.
- friend ACE_Export int operator >= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator >= (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
/// True if @a tv1 == @a tv2.
- friend ACE_Export int operator == (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator == (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
/// True if @a tv1 != @a tv2.
- friend ACE_Export int operator != (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
+ friend ACE_Export bool operator != (const ACE_Time_Value &tv1,
+ const ACE_Time_Value &tv2);
//@{
/// Multiplies the time value by @a d
diff --git a/ace/Time_Value.inl b/ace/Time_Value.inl
index 8e4be0d8940..6ef09b57788 100644
--- a/ace/Time_Value.inl
+++ b/ace/Time_Value.inl
@@ -176,7 +176,7 @@ operator * (const ACE_Time_Value &tv, double d)
// True if tv1 > tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator > (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -192,7 +192,7 @@ operator > (const ACE_Time_Value &tv1,
// True if tv1 >= tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator >= (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -237,7 +237,7 @@ ACE_Time_Value::ACE_Time_Value (const timespec_t &tv)
// True if tv1 < tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator < (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -247,7 +247,7 @@ operator < (const ACE_Time_Value &tv1,
// True if tv1 >= tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator <= (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -257,7 +257,7 @@ operator <= (const ACE_Time_Value &tv1,
// True if tv1 == tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator == (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -268,7 +268,7 @@ operator == (const ACE_Time_Value &tv1,
// True if tv1 != tv2.
-ACE_INLINE int
+ACE_INLINE bool
operator != (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
@@ -326,4 +326,3 @@ operator - (const ACE_Time_Value &tv1,
delta.normalize ();
return delta;
}
-
diff --git a/ace/Timeprobe.h b/ace/Timeprobe.h
index 0eaec4a9e2c..80f4c134542 100644
--- a/ace/Timeprobe.h
+++ b/ace/Timeprobe.h
@@ -73,7 +73,7 @@ public:
u_long minimum_id_;
/// Comparison
- int operator== (const ACE_Event_Descriptions &rhs) const;
+ bool operator== (const ACE_Event_Descriptions &rhs) const;
};
/**
diff --git a/ace/Timeprobe.i b/ace/Timeprobe.i
index 31f022f77b4..7704c9b4edd 100644
--- a/ace/Timeprobe.i
+++ b/ace/Timeprobe.i
@@ -1,6 +1,8 @@
+// -*- C++ -*-
+//
// $Id$
-ACE_INLINE int
+ACE_INLINE bool
ACE_Event_Descriptions::operator== (const ACE_Event_Descriptions &rhs) const
{
return this->minimum_id_ == rhs.minimum_id_ &&
diff --git a/ace/UNIX_Addr.h b/ace/UNIX_Addr.h
index 9659a30d8fc..df31faa137e 100644
--- a/ace/UNIX_Addr.h
+++ b/ace/UNIX_Addr.h
@@ -71,10 +71,10 @@ public:
virtual int string_to_addr (const char addr[]);
/// Compare two addresses for equality.
- int operator == (const ACE_UNIX_Addr &SAP) const;
+ bool operator == (const ACE_UNIX_Addr &SAP) const;
/// Compare two addresses for inequality.
- int operator != (const ACE_UNIX_Addr &SAP) const;
+ bool operator != (const ACE_UNIX_Addr &SAP) const;
/// Return the path name of the underlying rendezvous point.
const char *get_path_name (void) const;
diff --git a/ace/UNIX_Addr.i b/ace/UNIX_Addr.i
index d70ec1ffaa9..57303a817da 100644
--- a/ace/UNIX_Addr.i
+++ b/ace/UNIX_Addr.i
@@ -1,11 +1,11 @@
-
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
-// UNIX_Addr.i
#include "ace/OS_NS_string.h"
+
#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
// Return a pointer to the underlying address.
@@ -37,7 +37,7 @@ ACE_UNIX_Addr::addr_to_string (char s[], size_t len) const
// Compare two addresses for equality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_UNIX_Addr::operator == (const ACE_UNIX_Addr &sap) const
{
return ACE_OS::strncmp (this->unix_addr_.sun_path,
@@ -47,7 +47,7 @@ ACE_UNIX_Addr::operator == (const ACE_UNIX_Addr &sap) const
// Compare two addresses for inequality.
-ACE_INLINE int
+ACE_INLINE bool
ACE_UNIX_Addr::operator != (const ACE_UNIX_Addr &sap) const
{
return !((*this) == sap); // This is lazy, of course... ;-)
@@ -61,7 +61,7 @@ ACE_UNIX_Addr::get_path_name (void) const
return this->unix_addr_.sun_path;
}
-ACE_INLINE u_long
+ACE_INLINE u_long
ACE_UNIX_Addr::hash (void) const
{
return ACE::hash_pjw (this->unix_addr_.sun_path);
diff --git a/ace/Unbounded_Set.cpp b/ace/Unbounded_Set.cpp
index 3ec5d679602..948144cbc06 100644
--- a/ace/Unbounded_Set.cpp
+++ b/ace/Unbounded_Set.cpp
@@ -341,14 +341,14 @@ ACE_Unbounded_Set_Iterator<T>::operator* (void)
return *retv;
}
-template <class T> int
+template <class T> bool
ACE_Unbounded_Set_Iterator<T>::operator== (const ACE_Unbounded_Set_Iterator<T> &rhs) const
{
//ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator==");
return (this->set_ == rhs.set_ && this->current_ == rhs.current_);
}
-template <class T> int
+template <class T> bool
ACE_Unbounded_Set_Iterator<T>::operator!= (const ACE_Unbounded_Set_Iterator<T> &rhs) const
{
//ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator!=");
diff --git a/ace/Unbounded_Set.h b/ace/Unbounded_Set.h
index 6e98b18854a..ffb57a2799b 100644
--- a/ace/Unbounded_Set.h
+++ b/ace/Unbounded_Set.h
@@ -67,8 +67,8 @@ public:
T& operator* (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Unbounded_Set_Iterator<T> &) const;
- int operator!= (const ACE_Unbounded_Set_Iterator<T> &) const;
+ bool operator== (const ACE_Unbounded_Set_Iterator<T> &) const;
+ bool operator!= (const ACE_Unbounded_Set_Iterator<T> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -126,8 +126,8 @@ public:
T& operator* (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Unbounded_Set_Const_Iterator<T> &) const;
- int operator!= (const ACE_Unbounded_Set_Const_Iterator<T> &) const;
+ bool operator== (const ACE_Unbounded_Set_Const_Iterator<T> &) const;
+ bool operator!= (const ACE_Unbounded_Set_Const_Iterator<T> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
diff --git a/ace/Unbounded_Set_Ex.cpp b/ace/Unbounded_Set_Ex.cpp
index c81300b316a..e59e33857f9 100644
--- a/ace/Unbounded_Set_Ex.cpp
+++ b/ace/Unbounded_Set_Ex.cpp
@@ -16,7 +16,9 @@
#include "ace/Unbounded_Set_Ex.inl"
#endif /* __ACE_INLINE__ */
-ACE_RCSID(ace, Unbounded_Set_Ex, "$Id$")
+ACE_RCSID (ace,
+ Unbounded_Set_Ex,
+ "$Id$")
ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Set_Ex)
@@ -460,14 +462,14 @@ ACE_Unbounded_Set_Ex_Iterator<T>::operator* (void)
return *retv;
}
-template <class T> int
+template <class T> bool
ACE_Unbounded_Set_Ex_Iterator<T>::operator== (const ACE_Unbounded_Set_Ex_Iterator<T> &rhs) const
{
//ACE_TRACE ("ACE_Unbounded_Set_Ex_Iterator<T>::operator==");
return (this->set_ == rhs.set_ && this->current_ == rhs.current_);
}
-template <class T> int
+template <class T> bool
ACE_Unbounded_Set_Ex_Iterator<T>::operator!= (const ACE_Unbounded_Set_Ex_Iterator<T> &rhs) const
{
//ACE_TRACE ("ACE_Unbounded_Set_Ex_Iterator<T>::operator!=");
diff --git a/ace/Unbounded_Set_Ex.h b/ace/Unbounded_Set_Ex.h
index 25ca6b181be..60dfda38cfa 100644
--- a/ace/Unbounded_Set_Ex.h
+++ b/ace/Unbounded_Set_Ex.h
@@ -82,8 +82,8 @@ public:
T& operator* (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Unbounded_Set_Ex_Iterator<T> &) const;
- int operator!= (const ACE_Unbounded_Set_Ex_Iterator<T> &) const;
+ bool operator== (const ACE_Unbounded_Set_Ex_Iterator<T> &) const;
+ bool operator!= (const ACE_Unbounded_Set_Ex_Iterator<T> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -155,8 +155,8 @@ public:
T& operator* (void);
/// Check if two iterators point to the same position
- int operator== (const ACE_Unbounded_Set_Ex_Const_Iterator<T> &) const;
- int operator!= (const ACE_Unbounded_Set_Ex_Const_Iterator<T> &) const;
+ bool operator== (const ACE_Unbounded_Set_Ex_Const_Iterator<T> &) const;
+ bool operator!= (const ACE_Unbounded_Set_Ex_Const_Iterator<T> &) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
diff --git a/ace/Vector_T.cpp b/ace/Vector_T.cpp
index 9fc23b0d712..1101fe04139 100644
--- a/ace/Vector_T.cpp
+++ b/ace/Vector_T.cpp
@@ -56,19 +56,20 @@ void ACE_Vector<T, DEFAULT_SIZE>::dump (void) const
}
// Compare this vector with <s> for equality.
-template <class T, size_t DEFAULT_SIZE> int
+template <class T, size_t DEFAULT_SIZE> bool
ACE_Vector<T, DEFAULT_SIZE>::operator== (const ACE_Vector<T, DEFAULT_SIZE> &s) const
{
if (this == &s)
- return 1;
+ return true;
else if (this->size () != s.size ())
- return 0;
+ return false;
- for (size_t slot = 0; slot < s.size (); slot++)
+ const size_t len = s.size ();
+ for (size_t slot = 0; slot < len; ++slot)
if ((*this)[slot] != s[slot])
- return 0;
+ return false;
- return 1;
+ return true;
}
#if 0
diff --git a/ace/Vector_T.h b/ace/Vector_T.h
index b8212302fa1..9b56c679aac 100644
--- a/ace/Vector_T.h
+++ b/ace/Vector_T.h
@@ -173,7 +173,7 @@ public:
* Compare this vector with @arg s for equality. Two vectors are equal
* if their sizes are equal and all the elements are equal.
*/
- int operator== (const ACE_Vector<T, DEFAULT_SIZE> &s) const;
+ bool operator== (const ACE_Vector<T, DEFAULT_SIZE> &s) const;
///Inequality comparison operator.
/**
@@ -181,7 +181,7 @@ public:
* @arg s is always the complement of the boolean return value of
* @c *this == @arg s.
*/
- int operator!= (const ACE_Vector<T, DEFAULT_SIZE> &s) const;
+ bool operator!= (const ACE_Vector<T, DEFAULT_SIZE> &s) const;
protected:
@@ -206,7 +206,7 @@ protected:
/**
* Compare two vectors in the range of [from_ndx..to_ndx]. This
- * template function requires class T to have the operator!=()
+ * template function requires class T to have the bool operator!=()
* declared in the class. It is safe to define vectors of scalar data
* types, like int, double, etc., including class ACE_TString.
*
diff --git a/ace/Vector_T.i b/ace/Vector_T.i
index e5135ddca75..a936c2bfe4d 100644
--- a/ace/Vector_T.i
+++ b/ace/Vector_T.i
@@ -42,7 +42,7 @@ void ACE_Vector<T, DEFAULT_SIZE>::pop_back (void)
// Compare this vector with <s> for inequality.
-template <class T, size_t DEFAULT_SIZE> ACE_INLINE int
+template <class T, size_t DEFAULT_SIZE> ACE_INLINE bool
ACE_Vector<T, DEFAULT_SIZE>::operator!= (const ACE_Vector<T, DEFAULT_SIZE> &s) const
{
return !(*this == s);