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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
  • Loading branch information
wroy7860 committed Sep 18, 2018
1 parent 87f86da commit 5bb7240
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 5bb7240

Please sign in to comment.