summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-01-05 13:12:55 +0100
committerGitHub <noreply@github.com>2021-01-05 13:12:55 +0100
commit30477fe4b5ec8b09c163189e4cbb62fd185a689f (patch)
tree976ea76f7ee23f83700a8c9fbd6b6f2d1ba6662c /TAO
parent78006062ece6be12eba3e81471961c74743ba071 (diff)
parent8a11e3c87a0e7bffe52754644ea6a243b1b9aee5 (diff)
downloadATCD-30477fe4b5ec8b09c163189e4cbb62fd185a689f.tar.gz
Merge pull request #1368 from jwillemsen/jwi-ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE
Remove ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE, not …
Diffstat (limited to 'TAO')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp16
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;
}