aboutsummaryrefslogtreecommitdiff
path: root/src/common/json_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/json_util.h')
-rw-r--r--src/common/json_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/json_util.h b/src/common/json_util.h
index 661022a6f..c320c3956 100644
--- a/src/common/json_util.h
+++ b/src/common/json_util.h
@@ -29,14 +29,14 @@
#pragma once
#define GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, name, type, jtype, mandatory, def) \
- type field_##name = def; \
+ type field_##name = static_cast<type>(def); \
bool field_##name##_found = false; \
(void)field_##name##_found; \
do if (json.HasMember(#name)) \
{ \
if (json[#name].Is##jtype()) \
{ \
- field_##name = json[#name].Get##jtype(); \
+ field_##name = static_cast<type>(json[#name].Get##jtype()); \
field_##name##_found = true; \
} \
else \