summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2023-02-01 10:51:23 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2023-02-01 10:51:23 +0100
commitc3e71f69e85deb48d5f3cdba355679da4deffdb3 (patch)
tree8fdc1065862e4a4f696d4cc4d5c0292345802ae5 /TAO
parent8ab31e3e5bb8c09a9c326a54545f4cb475345a78 (diff)
downloadATCD-c3e71f69e85deb48d5f3cdba355679da4deffdb3.tar.gz
good_bit is a bool and removed some uncessary c-style casts
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser_10.cpp4
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser_12.cpp2
-rw-r--r--TAO/tao/Object.cpp8
-rw-r--r--TAO/tao/Principal.cpp4
-rw-r--r--TAO/tao/Profile.cpp4
-rw-r--r--TAO/tao/Stub.cpp2
-rw-r--r--TAO/tao/Tagged_Profile.cpp6
-rw-r--r--TAO/tao/Valuetype/AbstractBase.cpp2
-rw-r--r--TAO/tao/Valuetype/ValueBase.cpp8
-rw-r--r--TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp4
-rw-r--r--TAO/utils/catior/Catior_i.cpp12
11 files changed, 28 insertions, 28 deletions
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp
index d5bb7996fa8..de75c05f61d 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp
+++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp
@@ -333,7 +333,7 @@ TAO_GIOP_Message_Generator_Parser_10::parse_request_header (
if (!(input >> service_info))
return -1;
- CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
+ CORBA::Boolean hdr_status = input.good_bit ();
CORBA::ULong req_id = 0;
@@ -392,7 +392,7 @@ TAO_GIOP_Message_Generator_Parser_10::parse_request_header (
CORBA::OctetSeq oct_seq;
input >> oct_seq;
request.requesting_principal (oct_seq);
- hdr_status = (CORBA::Boolean) input.good_bit ();
+ hdr_status = input.good_bit ();
}
return hdr_status ? 0 : -1;
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
index 6396db7a269..7cbadbbc658 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
+++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
@@ -225,7 +225,7 @@ TAO_GIOP_Message_Generator_Parser_12::parse_request_header (
// Get the input CDR in the request class
TAO_InputCDR & input = *request.incoming ();
- CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
+ CORBA::Boolean hdr_status = input.good_bit ();
CORBA::ULong req_id = 0;
// Get the rest of the request header ...
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index f1be9002e7d..1fdb4a980ec 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -136,7 +136,7 @@ CORBA::Object::marshal (const CORBA::Object_ptr x, TAO_OutputCDR &cdr)
cdr.write_ulong (1);
cdr.write_char ('\0');
cdr.write_ulong (0);
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
return x->marshal (cdr);
@@ -707,7 +707,7 @@ operator<< (TAO_OutputCDR& cdr, const CORBA::Object* x)
cdr.write_ulong (1);
cdr.write_char ('\0');
cdr.write_ulong (0);
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
if (!x->is_evaluated ())
@@ -873,7 +873,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x)
if (profile_count == 0)
{
x = CORBA::Object::_nil ();
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
// get a profile container to store all profiles in the IOR.
@@ -981,7 +981,7 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x)
}
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
#if defined (GEN_OSTREAM_OPS)
diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp
index a8710e3b283..7b5f1c318cb 100644
--- a/TAO/tao/Principal.cpp
+++ b/TAO/tao/Principal.cpp
@@ -34,7 +34,7 @@ operator<< (TAO_OutputCDR & cdr, CORBA::Principal * x)
cdr.write_ulong (0);
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
CORBA::Boolean
@@ -54,7 +54,7 @@ operator>> (TAO_InputCDR & cdr, CORBA::Principal *& x)
cdr.read_octet_array (x->id.get_buffer (), length);
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index 9bc48cb6352..6465f4ef0a2 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -889,7 +889,7 @@ operator<< (TAO_OutputCDR& cdr, const TAO_opaque& x)
cdr.write_octet_array (x.get_buffer (), length);
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
CORBA::Boolean
@@ -917,7 +917,7 @@ operator>>(TAO_InputCDR& cdr, TAO_opaque& x)
cdr.read_octet_array (x.get_buffer (), length);
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index c132daaeef9..4517c747428 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -569,7 +569,7 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr)
// release ACE_Lock
}
- return (CORBA::Boolean) cdr.good_bit ();
+ return cdr.good_bit ();
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Tagged_Profile.cpp b/TAO/tao/Tagged_Profile.cpp
index e1fc756e517..2731ea66fb4 100644
--- a/TAO/tao/Tagged_Profile.cpp
+++ b/TAO/tao/Tagged_Profile.cpp
@@ -87,7 +87,7 @@ TAO_Tagged_Profile::unmarshall_object_key (TAO_InputCDR &input)
CORBA::Boolean
TAO_Tagged_Profile::unmarshall_object_key_i (TAO_InputCDR &input)
{
- CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
+ CORBA::Boolean hdr_status = input.good_bit ();
CORBA::Long key_length = 0;
hdr_status = hdr_status && input.read_long (key_length);
@@ -110,7 +110,7 @@ TAO_Tagged_Profile::unmarshall_object_key_i (TAO_InputCDR &input)
CORBA::Boolean
TAO_Tagged_Profile::unmarshall_iop_profile_i (TAO_InputCDR &input)
{
- CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
+ CORBA::Boolean hdr_status = input.good_bit ();
// Extract into the IOP::Tagged profile.
hdr_status &= input >> this->profile_;
@@ -121,7 +121,7 @@ TAO_Tagged_Profile::unmarshall_iop_profile_i (TAO_InputCDR &input)
CORBA::Boolean
TAO_Tagged_Profile::unmarshall_ref_addr_i (TAO_InputCDR &input)
{
- CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
+ CORBA::Boolean hdr_status = input.good_bit ();
/*
* The GIOP::IORAddressingInfo is defined as follows
diff --git a/TAO/tao/Valuetype/AbstractBase.cpp b/TAO/tao/Valuetype/AbstractBase.cpp
index c6785f74a25..f9bddb40e11 100644
--- a/TAO/tao/Valuetype/AbstractBase.cpp
+++ b/TAO/tao/Valuetype/AbstractBase.cpp
@@ -197,7 +197,7 @@ operator<< (TAO_OutputCDR &strm, const CORBA::AbstractBase_ptr abs)
}
}
- return (CORBA::Boolean) strm.good_bit ();
+ return strm.good_bit ();
}
}
else
diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp
index 3a92ae576d7..2fa3079f778 100644
--- a/TAO/tao/Valuetype/ValueBase.cpp
+++ b/TAO/tao/Valuetype/ValueBase.cpp
@@ -1251,7 +1251,7 @@ CORBA::ValueBase::_tao_read_codebase_url (TAO_InputCDR& strm,
if (!strm.read_ulong (length))
{
- return 0;
+ return false;
}
VERIFY_MAP (TAO_InputCDR, codebase_url_map, Codebase_URL_Map);
@@ -1276,11 +1276,11 @@ CORBA::ValueBase::_tao_read_codebase_url (TAO_InputCDR& strm,
if (!url_stream.good_bit ())
{
- return 0;
+ return false;
}
if (! url_stream.read_string (codebase_url))
- return 0;
+ return false;
// It's possible the codebase url is read again from an indirection stream,
// so make sure the codebase url is the same.
@@ -1316,7 +1316,7 @@ CORBA::ValueBase::_tao_read_codebase_url (TAO_InputCDR& strm,
strm.skip_bytes (length);
- return 1;
+ return true;
}
void
diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp
index 7ad4be97e15..d8ada0b832e 100644
--- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp
+++ b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp
@@ -122,11 +122,11 @@ IBM1047_ISO8859::write_char_array (ACE_OutputCDR& out,
buf[i] = (unsigned char)from_IBM1047[(unsigned char)buf[i]];
}
- return 1;
+ return true;
}
this->good_bit(out, 0);
- return 0;
+ return false;
}
// ****************************************************************
diff --git a/TAO/utils/catior/Catior_i.cpp b/TAO/utils/catior/Catior_i.cpp
index c0489e7329d..b41f6c75319 100644
--- a/TAO/utils/catior/Catior_i.cpp
+++ b/TAO/utils/catior/Catior_i.cpp
@@ -1036,7 +1036,7 @@ Catior_i::_find_info (CORBA::ULong id)
void
Catior_i::displayHex (TAO_InputCDR & str)
{
- if (str.good_bit () == 0)
+ if (!str.good_bit ())
return;
TAO_InputCDR clone_str (str);
@@ -1258,7 +1258,7 @@ Catior_i::cat_profile_helper (TAO_InputCDR& stream,
// buffer, and skip the encapsulation.
TAO_InputCDR str (stream, encap_len);
- if (str.good_bit () == 0 || stream.skip_bytes (encap_len) == 0)
+ if (!str.good_bit () || stream.skip_bytes (encap_len) == 0)
return false;
static const size_t bufsize = 512;
@@ -1346,7 +1346,7 @@ Catior_i::cat_coiop_profile (TAO_InputCDR& stream)
// buffer, and skip the encapsulation.
TAO_InputCDR str (stream, encap_len);
- if (str.good_bit () == 0 || stream.skip_bytes (encap_len) == 0)
+ if (!str.good_bit () || stream.skip_bytes (encap_len) == 0)
return false;
static const size_t bufsize = 512;
@@ -1436,7 +1436,7 @@ Catior_i::cat_uiop_profile (TAO_InputCDR& stream)
// buffer, and skip the encapsulation.
TAO_InputCDR str (stream, encap_len);
- if (str.good_bit () == 0 || stream.skip_bytes (encap_len) == 0)
+ if (!str.good_bit () || stream.skip_bytes (encap_len) == 0)
return false;
static const size_t bufsize = 512;
@@ -1517,7 +1517,7 @@ Catior_i::cat_sciop_profile (TAO_InputCDR& stream)
// buffer, and skip the encapsulation.
TAO_InputCDR str (stream, encap_len);
- if (str.good_bit () == 0 || stream.skip_bytes (encap_len) == 0)
+ if (!str.good_bit () || stream.skip_bytes (encap_len) == 0)
return false;
static const size_t bufsize = 512;
@@ -1623,7 +1623,7 @@ Catior_i::cat_nsk_profile_helper (TAO_InputCDR& stream,
// buffer, and skip the encapsulation.
TAO_InputCDR str (stream, encap_len);
- if (str.good_bit () == 0 || stream.skip_bytes (encap_len) == 0)
+ if (!str.good_bit () || stream.skip_bytes (encap_len) == 0)
return false;
static const size_t bufsize = 512;