summaryrefslogtreecommitdiff
path: root/ACE/ace/CDR_Size.inl
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 /ACE/ace/CDR_Size.inl
parent8ab31e3e5bb8c09a9c326a54545f4cb475345a78 (diff)
downloadATCD-c3e71f69e85deb48d5f3cdba355679da4deffdb3.tar.gz
good_bit is a bool and removed some uncessary c-style casts
Diffstat (limited to 'ACE/ace/CDR_Size.inl')
-rw-r--r--ACE/ace/CDR_Size.inl48
1 files changed, 23 insertions, 25 deletions
diff --git a/ACE/ace/CDR_Size.inl b/ACE/ace/CDR_Size.inl
index 5d5edca3247..29cc5ac9a76 100644
--- a/ACE/ace/CDR_Size.inl
+++ b/ACE/ace/CDR_Size.inl
@@ -43,7 +43,7 @@ ACE_SizeCDR::write_octet (ACE_CDR::Octet x)
ACE_INLINE ACE_CDR::Boolean
ACE_SizeCDR::write_boolean (ACE_CDR::Boolean x)
{
- return (ACE_CDR::Boolean) this->write_octet (x ? (ACE_CDR::Octet) 1 : (ACE_CDR::Octet) 0);
+ return this->write_octet (x ? (ACE_CDR::Octet) 1 : (ACE_CDR::Octet) 0);
}
ACE_INLINE ACE_CDR::Boolean
@@ -184,7 +184,7 @@ ACE_SizeCDR::write_wchar_array (const ACE_CDR::WChar* x,
if (ACE_OutputCDR::wchar_maxbytes () == 0)
{
errno = EACCES;
- return (ACE_CDR::Boolean) (this->good_bit_ = false);
+ return (this->good_bit_ = false);
}
if (ACE_OutputCDR::wchar_maxbytes () == sizeof (ACE_CDR::WChar))
return this->write_array (x,
@@ -305,98 +305,98 @@ ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Char x)
{
ss.write_char (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Short x)
{
ss.write_short (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::UShort x)
{
ss.write_ushort (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Long x)
{
ss.write_long (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::ULong x)
{
ss.write_ulong (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::LongLong x)
{
ss.write_longlong (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::ULongLong x)
{
ss.write_ulonglong (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::LongDouble x)
{
ss.write_longdouble (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Float x)
{
ss.write_float (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Double x)
{
ss.write_double (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, const ACE_CDR::Fixed &x)
{
ss.write_fixed (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, const ACE_CDR::Char *x)
{
ss.write_string (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, const ACE_CDR::WChar *x)
{
ss.write_wstring (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, const std::string& x)
{
ss.write_string (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
#if !defined(ACE_LACKS_STD_WSTRING)
@@ -404,7 +404,7 @@ ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, const std::wstring& x)
{
ss.write_wstring (x);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
#endif
@@ -413,28 +413,28 @@ ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_boolean x)
{
ss.write_boolean (x.val_);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_char x)
{
ss.write_char (x.val_);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wchar x)
{
ss.write_wchar (x.val_);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_octet x)
{
ss.write_octet (x.val_);
- return (ACE_CDR::Boolean) ss.good_bit ();
+ return ss.good_bit ();
}
ACE_INLINE ACE_CDR::Boolean
@@ -448,8 +448,7 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_string x)
}
ss.write_string (len, x.val_);
- return
- (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_));
+ return (ss.good_bit () && (!x.bound_ || len <= x.bound_));
}
ACE_INLINE ACE_CDR::Boolean
@@ -463,8 +462,7 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wstring x)
}
ss.write_wstring (len, x.val_);
- return
- (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_));
+ return (ss.good_bit () && (!x.bound_ || len <= x.bound_));
}