summaryrefslogtreecommitdiff
path: root/ACE/ace/Handle_Set.inl
diff options
context:
space:
mode:
authorDavid Kyle <david.kyle@gmail.com>2018-04-13 17:39:19 -0400
committerDavid Kyle <david.kyle@gmail.com>2018-04-13 17:39:19 -0400
commitf160e4078d8d1591d71e36c3dc0d32c7f65c0880 (patch)
treec99077b03f254525f7f6ec011b411420a16ec901 /ACE/ace/Handle_Set.inl
parentb08762b114014d42ba557ed8763aba8253ad1612 (diff)
downloadATCD-f160e4078d8d1591d71e36c3dc0d32c7f65c0880.tar.gz
Always const_cast for FD_ISSET. Remove intra-statement #if
Diffstat (limited to 'ACE/ace/Handle_Set.inl')
-rw-r--r--ACE/ace/Handle_Set.inl16
1 files changed, 7 insertions, 9 deletions
diff --git a/ACE/ace/Handle_Set.inl b/ACE/ace/Handle_Set.inl
index a0672bf3a4b..d3cfe6d3822 100644
--- a/ACE/ace/Handle_Set.inl
+++ b/ACE/ace/Handle_Set.inl
@@ -65,18 +65,16 @@ ACE_INLINE int
ACE_Handle_Set::is_set (ACE_HANDLE handle) const
{
ACE_TRACE ("ACE_Handle_Set::is_set");
-#if defined (ACE_HAS_NONCONST_FD_ISSET)
+
fd_set *set = const_cast<fd_set*> (&this->mask_);
-#else
- const fd_set *set = &this->mask_;
-#endif
- return FD_ISSET (handle, set)
+ int ret = FD_ISSET (handle, set);
+
#if defined (ACE_HAS_BIG_FD_SET)
- && this->size_ > 0
+ ret = ret && this->size_ > 0;
#elif defined (ACE_VXWORKS) && ACE_VXWORKS >= 0x690
- != 0
-#endif /* ACE_HAS_BIG_FD_SET */
- ; // end of return
+ ret = ret != 0;
+#endif
+ return ret;
}
// Enables the handle.