summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-12-21 18:50:46 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-12-21 18:50:46 +0000
commitaf825cba7c04052fccf4c6552fd0cb31a87d766e (patch)
tree35f14f200c42cee00168054875c0742a85734125 /TAO
parent6cadf620e252bf7a947e3e46bf48b8f3520f6e3d (diff)
downloadATCD-af825cba7c04052fccf4c6552fd0cb31a87d766e.tar.gz
ChangeLogTag: Wed Dec 21 18:45:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/constraint.l46
-rw-r--r--TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp16
3 files changed, 33 insertions, 33 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
index f8363038749..6c1452143c2 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
@@ -802,7 +802,7 @@ YY_RULE_SETUP
{
yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Boolean) 1);
+ new TAO_Literal_Constraint(true);
TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
}
ACE_NOTREACHED (YY_BREAK)
@@ -811,7 +811,7 @@ YY_RULE_SETUP
{
yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Boolean) 0);
+ new TAO_Literal_Constraint(false);
TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
}
ACE_NOTREACHED (YY_BREAK)
diff --git a/TAO/orbsvcs/orbsvcs/Trader/constraint.l b/TAO/orbsvcs/orbsvcs/Trader/constraint.l
index 445219603c8..9d1aef05376 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/constraint.l
+++ b/TAO/orbsvcs/orbsvcs/Trader/constraint.l
@@ -4,7 +4,7 @@
//
// = LIBRARY
// orbsvcs
-//
+//
// = FILENAME
// constraint.l
//
@@ -35,8 +35,8 @@ white_space [ \t]
letter [a-zA-Z]
digit [0-9]
alpha_num ({letter}|{digit})
-integer [-+]?{digit}+
-float ({digit}*\.{digit}+)([eE][-+]?{digit}+)?
+integer [-+]?{digit}+
+float ({digit}*\.{digit}+)([eE][-+]?{digit}+)?
string '(([^'\\]*)|([^'\\]*\\')|([^'\\]*\\\\))*'
ident {letter}({alpha_num}|[_])*
newline \n
@@ -67,37 +67,37 @@ in { TAO_YY_LEX_DEBUG; return TAO_IN; }
"!=" { TAO_YY_LEX_DEBUG; return TAO_NE; }
"(" { TAO_YY_LEX_DEBUG; return TAO_LPAREN; }
")" { TAO_YY_LEX_DEBUG; return TAO_RPAREN; }
-TRUE {
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Boolean) 1);
+TRUE {
+ yylval.constraint_ =
+ new TAO_Literal_Constraint(true);
TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
}
-FALSE {
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Boolean) 0);
+FALSE {
+ yylval.constraint_ =
+ new TAO_Literal_Constraint(false);
TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
}
-{integer} {
- yylval.constraint_ =
+{integer} {
+ yylval.constraint_ =
new TAO_Literal_Constraint((yytext[0] == '-' ?
(CORBA::Long)atoi(yytext) : (CORBA::ULong)atoi(yytext)));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
+ TAO_YY_LEX_DEBUG; return TAO_NUMBER;
}
-{float} {
- yylval.constraint_ =
+{float} {
+ yylval.constraint_ =
new TAO_Literal_Constraint((CORBA::Double)atof(yytext));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
+ TAO_YY_LEX_DEBUG; return TAO_NUMBER;
}
-{string} {
+{string} {
yylval.constraint_ = extract_string(yytext);
- TAO_YY_LEX_DEBUG; return TAO_STRING;
+ TAO_YY_LEX_DEBUG; return TAO_STRING;
}
-{ident} {
- yylval.constraint_ =
+{ident} {
+ yylval.constraint_ =
new TAO_Property_Constraint(yytext);
- TAO_YY_LEX_DEBUG; return TAO_IDENT;
+ TAO_YY_LEX_DEBUG; return TAO_IDENT;
}
-{unknown} {
+{unknown} {
TAO_YY_LEX_DEBUG; return TAO_UNKNOWN;
}
%%
@@ -105,7 +105,7 @@ FALSE {
TAO_Literal_Constraint*
extract_string(const char* total)
{
- int prev_slash = 0,
+ int prev_slash = 0,
ctr = 0;
char str[BUFSIZ],
*tmp = (char*) total + 1;
@@ -133,4 +133,4 @@ extract_string(const char* total)
return new TAO_Literal_Constraint(str);
}
-TAO_END_VERSIONED_NAMESPACE_DECL \ No newline at end of file
+TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp
index 031596498a0..3898bd54040 100644
--- a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp
+++ b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp
@@ -26,7 +26,7 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object
// Make sure that the servant is in the same ORB that created this
// object.
if (!object->_is_collocated ())
- return 0;
+ return false;
// Get the orb core.
TAO_ORB_Core *orb_core =
@@ -47,7 +47,7 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object
// If the target POA does not have a dedicated thread pool, then all
// calls to it are collocated.
if (target_thread_pool == 0)
- return 1;
+ return true;
/// Get the ORB_Core's TSS resources.
TAO_ORB_Core_TSS_Resources &tss =
@@ -68,17 +68,17 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object
// different pool than POA. Therefore, this object is not
// collocated.
if (current_thread_pool != target_thread_pool)
- return 0;
+ return false;
// If the current thread and the POA are in the default thread pool,
// then the object is collocated.
if (current_thread_pool == 0)
- return 1;
+ return true;
// If the current thread and the POA are in a thread pool without
// lanes, then the object is collocated.
if (!current_thread_pool->with_lanes ())
- return 1;
+ return true;
// Grab the priority model used by the POA. Note that this cannot
// be NOT_SPECIFIED because NOT_SPECIFIED is not allowed with thread
@@ -90,7 +90,7 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object
// because the current thread is of the correct priority :-) and
// we'll simple use the current thread to run the upcall.
if (priority_model == TAO::Portable_Server::Cached_Policies::CLIENT_PROPAGATED)
- return 1;
+ return true;
// Locate the target servant. We are really not interested in the
// servant itself but in the priority that this servant will run at.
@@ -116,9 +116,9 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object
// If it matches the current thread's priority, then we are
// collocated. Otherwise we are not.
if (target_priority == current_thread_lane->lane_priority ())
- return 1;
+ return true;
else
- return 0;
+ return false;
}
TAO_END_VERSIONED_NAMESPACE_DECL