From af35ea75ec83ecc97b8d2040e6a11065a520b5ca Mon Sep 17 00:00:00 2001 From: Marly Fleitas Date: Thu, 13 Sep 2018 18:14:18 -0400 Subject: [PATCH] test: explicitly cast to uint32_t in test Explicitly casting to `uint32_t` prevents a template resolution ambiguity on 32-bit platforms. Fixes: https://github.com/nodejs/node-addon-api/issues/337 PR-URL: https://github.com/nodejs/node-addon-api/pull/341 Fixes: https://github.com/nodejs/node-addon-api/issues/337 Reviewed-By: Michael Dawson Reviewed-By: Nicola Del Gobbo --- test/object/object.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/object/object.cc b/test/object/object.cc index 50fac97..713ed58 100644 --- a/test/object/object.cc +++ b/test/object/object.cc @@ -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;