From 186c4928b4b861863bf99253580896910dc78f30 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 13 Sep 2018 18:14:18 -0400 Subject: [PATCH] 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 --- 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 50fac9722..713ed5827 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;