Browse files

Fix accidental extra paste on static cast

  • Loading branch information...
1 parent 5866d77 commit 0373207035686f643aff85d47cb0bd30cc60017a @Benvie committed Feb 22, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 render-templates.js
View
4 render-templates.js
@@ -301,15 +301,15 @@ function argJsonToCtx(ctx, rawJson, arg, i) {
typeName = 'wxHelpEvent::Origin';
}
- argCode = util.format("%s %s = (%s)args[%d]->ToNumber()->Value();", typeName, argName, typeName, i);
+ argCode = util.format("%s %s = static_cast<%s>(args[%d]->ToInt32()->Value());", typeName, argName, typeName, i);
argCallCode = argName;
argDeclCode = util.format("%s%s %s", typeName, type.refs + type.pointers, argName);
argTestCode = util.format("args[%d]->IsNumber()", i);
} else if(typeName == "void") {
return null;
} else if(typeName && (typeName.match(/^wx.*/))) {
if(type.pointers == '**') {
- argCode = util.format("%s %s = static_cast<%s>(args[%d]->ToInt32()->Value());", typeName, argName, typeName, i);
+ argCode = util.format("%s* %s;", typeName, argName);
argDeclCode = util.format("%s** %s", typeName, argName);
argCallCode = "&" + argName;
} else {

0 comments on commit 0373207

Please sign in to comment.