Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix accidental extra paste on static cast

  • Loading branch information...
commit 0373207035686f643aff85d47cb0bd30cc60017a 1 parent 5866d77
Brandon Benvie authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 render-templates.js
4 render-templates.js
View
@@ -301,7 +301,7 @@ 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);
@@ -309,7 +309,7 @@ function argJsonToCtx(ctx, rawJson, arg, i) {
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 {
Please sign in to comment.
Something went wrong with that request. Please try again.