From 61d3cefa01dcbef2d6ec16e660d9d02767d2c5a8 Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 19 Jul 2002 06:50:48 +0000 Subject: Picked up a few style crimes and fixed them. Added code generation for Java constants to slice2java. Added missing keyword (strictfp) to lists of keywords that need escaping for Java. Fixed bug in Java code generator: if a type name had a prefix in common with the name of its enclosing scope, the scope mangling code stripped off too much of the scope. For example: enum color { red }; const color c = red; This resulted in the generated type name being "olor" instead of "color" because the constant starts with the same letter as the name of the type. Fixed bug in the keyword escape mechanism -- keywords embedded in scoped names were not escaped. Keywords escaping for both Java and C++ still has bugs. I wrote two Slice torture files full of keywords. Neither the generated C++ code nor the generated Java code work for those files yet. Need to look at this... --- cpp/src/Slice/CPlusPlusUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index f4838f81b35..5d1c95ec4a9 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -307,7 +307,7 @@ splitScopedName(const string& scoped) if(pos != scoped.size()) { string::size_type endpos = scoped.find("::", pos); - if (endpos != string::npos) + if(endpos != string::npos) { ids.push_back(scoped.substr(pos, endpos - pos)); } -- cgit v1.2.3