diff options
Diffstat (limited to 'orbsvcs/examples/LoadBalancing/server.cpp')
-rw-r--r-- | orbsvcs/examples/LoadBalancing/server.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/orbsvcs/examples/LoadBalancing/server.cpp b/orbsvcs/examples/LoadBalancing/server.cpp index 877811db90e..1ba89fe6b44 100644 --- a/orbsvcs/examples/LoadBalancing/server.cpp +++ b/orbsvcs/examples/LoadBalancing/server.cpp @@ -1,16 +1,14 @@ +// $Id$ + #include "tao/ORBInitializer_Registry.h" #include "StockFactory.h" #include "ORBInitializer.h" #include "RPS_Monitor.h" -#include "ace/OS.h" #include "ace/OS_NS_stdlib.h" +#include "ace/OS_NS_strings.h" #include "ace/Get_Opt.h" -ACE_RCSID (LoadBalancing, - server, - "$Id$") - const ACE_TCHAR *ior_output_file = ACE_TEXT("obj.ior"); CORBA::Float reject_threshold = 0; @@ -68,7 +66,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) argv [0]), -1); } - // Indicates sucessful parsing of the command line + // Indicates successful parsing of the command line return 0; } @@ -135,16 +133,16 @@ join_object_group (CORBA::ORB_ptr orb, strategy_info.name = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(strategy)); if (ACE_OS::strcasecmp (strategy, ACE_TEXT("LeastLoaded")) == 0 - && (reject_threshold != 0 - || critical_threshold != 0 - || dampening != 0)) + && (!ACE::is_equal (reject_threshold, 0.0f) + || !ACE::is_equal (critical_threshold, 0.0f) + || !ACE::is_equal (dampening, 0.0f))) { CORBA::ULong len = 1; PortableGroup::Properties & props = strategy_info.props; - if (reject_threshold != 0) + if (!ACE::is_equal (reject_threshold, 0.0f)) { const CORBA::ULong i = len - 1; @@ -156,7 +154,7 @@ join_object_group (CORBA::ORB_ptr orb, props[i].val <<= reject_threshold; } - if (critical_threshold != 0) + if (!ACE::is_equal (critical_threshold, 0.0f)) { const CORBA::ULong i = len - 1; @@ -168,7 +166,7 @@ join_object_group (CORBA::ORB_ptr orb, props[i].val <<= critical_threshold; } - if (dampening != 0) + if (!ACE::is_equal (dampening, 0.0f)) { const CORBA::ULong i = len - 1; |