diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp | 16 |
2 files changed, 3 insertions, 15 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp index ef25afde9ca..091a149ef13 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp @@ -109,7 +109,7 @@ be_visitor_constant_ch::visit_constant (be_constant *node) } // If this is true, can't generate inline constants. - bool forbidden_in_class = (snt != AST_Decl::NT_root + bool const forbidden_in_class = (snt != AST_Decl::NT_root && snt != AST_Decl::NT_module && (etype == AST_Expression::EV_string || etype == AST_Expression::EV_wstring diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp index 1db7973d95f..d8d063c3aa0 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp @@ -36,12 +36,12 @@ be_visitor_constant_cs::visit_constant (be_constant *node) && snt != AST_Decl::NT_module); if (be_global->gen_inline_constants () && !in_class) { - // No storeage is required in the source file for these + // No storage is required in the source file for these return 0; } AST_Expression::ExprType etype = node->et (); - bool forbidden_in_class = (in_class + bool const forbidden_in_class = (in_class && (etype == AST_Expression::EV_string || etype == AST_Expression::EV_wstring || etype == AST_Expression::EV_float @@ -54,13 +54,6 @@ be_visitor_constant_cs::visit_constant (be_constant *node) << "// " << __FILE__ << ":" << __LINE__; *os << be_nl_2; - if (be_global->gen_inline_constants () && !forbidden_in_class) - { - // Some compilers (especially Microsoft) always define storage - // when the initialiser is given, therefore the header has already - // done this (which is non-C++ complient by the way). - *os << "#ifndef ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE" << be_nl << " "; - } *os << "const "; if (node->et () == AST_Expression::EV_enum) @@ -81,11 +74,6 @@ be_visitor_constant_cs::visit_constant (be_constant *node) } *os << ";"; - if (be_global->gen_inline_constants () && !forbidden_in_class) - { - *os << be_nl << "#endif // ifndef ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE"; - } - node->cli_stub_gen (true); return 0; } |