diff options
-rwxr-xr-x | tools/keymap-gen | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/keymap-gen b/tools/keymap-gen index 4d583a3..5d4dca3 100755 --- a/tools/keymap-gen +++ b/tools/keymap-gen @@ -641,10 +641,12 @@ class CppLanguageGenerator(CLanguageGenerator): totypename = "const " + self.strtypename if totype == self.TYPE_STRING else self.inttypename if fromtype == self.TYPE_INT: print("#include <vector>") + print("extern const std::vector<%s> %s;" % (totypename, varname)); print("const std::vector<%s> %s = {" % (totypename, varname)) else: print("#include <map>") print("#include <string>") + print("extern const std::map<const std::string, %s> %s;" % (totypename, varname)) print("const std::map<const std::string, %s> %s = {" % (totypename, varname)) def _array_end(self, fromtype, totype): |