Skip to content

Commit

Permalink
test: explicitly cast to uint32_t in test
Browse files Browse the repository at this point in the history
Explicitly casting to `uint32_t` prevents a template resolution
ambiguity on 32-bit platforms.

Fixes: nodejs/node-addon-api#337

PR-URL: nodejs/node-addon-api#341
Fixes: nodejs/node-addon-api#337
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
  • Loading branch information
Marlyfleitas committed Sep 18, 2018
1 parent d8058bd commit af35ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/object/object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Value CreateObjectUsingMagic(const CallbackInfo& info) {
obj[std::string("s_true")] = true;
obj[std::string("s_false")] = false;
obj["0"] = 0;
obj[42] = 120;
obj[(uint32_t)42] = 120;
obj["0.0f"] = 0.0f;
obj["0.0"] = 0.0;
obj["-1"] = -1;
Expand Down

0 comments on commit af35ea7

Please sign in to comment.