From 8e56367314315c53c8c7bede25e5900da9c9e31c Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 19 Jun 2024 14:40:23 +0200 Subject: Add missing case for switch cases in JSON deserialization function (#712) RapidJSON switch gets a new case for null, where we do nothing. Future enum values would result in a new warning. --- primedev/scripts/scriptjson.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'primedev/scripts') diff --git a/primedev/scripts/scriptjson.cpp b/primedev/scripts/scriptjson.cpp index 06bda6f4..8959bf47 100644 --- a/primedev/scripts/scriptjson.cpp +++ b/primedev/scripts/scriptjson.cpp @@ -42,6 +42,8 @@ DecodeJsonArray(HSquirrelVM* sqvm, rapidjson::GenericValue g_pSquirrel->pushinteger(sqvm, itr.GetInt()); g_pSquirrel->arrayappend(sqvm, -2); break; + case rapidjson::kNullType: + break; } } } @@ -92,6 +94,8 @@ DecodeJsonTable(HSquirrelVM* sqvm, rapidjson::GenericValue } g_pSquirrel->newslot(sqvm, -3, false); break; + case rapidjson::kNullType: + break; } } } -- cgit v1.2.3