]> Dogcows Code - chaz/vimcoder/commitdiff
compressing types with multiple identifiers is bad for C++
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 23 Jun 2011 19:04:44 +0000 (13:04 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 23 Jun 2011 19:04:44 +0000 (13:04 -0600)
Sadly, it doesn't look like constructor syntax can be used
for multi-word types in C++, so "return long long();" from
the template won't compile, but oh well.  The return statement
is meant to be replaced anyway.
see #32

src/com/dogcows/Editor.java

index 40ccc829e8306613ae8afc9a036109f1890c498e..ff38a0ff4df175efde211fe7dd050fa3be86cd91 100644 (file)
@@ -89,7 +89,7 @@ public class Editor
 
                // Set up the terms used for the template expansion.
                HashMap<String,String> terms = new HashMap<String,String>();
-               terms.put("RETURNTYPE",   component.getReturnType().getDescriptor(language).replaceAll("\\s+", ""));
+               terms.put("RETURNTYPE",   component.getReturnType().getDescriptor(language));
                terms.put("CLASSNAME",    name);
                terms.put("METHODNAME",   component.getMethodName());
                terms.put("METHODPARAMS", getMethodParams(component.getParamTypes(),
@@ -295,7 +295,7 @@ public class Editor
                String[] strings = new String[types.length];
                for (int i = 0; i < types.length; ++i)
                {
-                       strings[i] = types[i].getDescriptor(language).replaceAll("\\s+", "");
+                       strings[i] = types[i].getDescriptor(language);
                }
                return strings;
        }
This page took 0.026176 seconds and 4 git commands to generate.