comparison Core/SerializationToolbox.cpp @ 3920:82e88ff003d7 c-get

merge default -> c-get
author Alain Mazy <alain@mazy.be>
date Tue, 12 May 2020 14:58:24 +0200
parents 09798f2b985f
children 5d2348b39392
comparison
equal deleted inserted replaced
3918:dba48c162b7b 3920:82e88ff003d7
96 return value[field.c_str()].asInt(); 96 return value[field.c_str()].asInt();
97 } 97 }
98 } 98 }
99 99
100 100
101 int ReadInteger(const Json::Value& value,
102 const std::string& field,
103 int defaultValue)
104 {
105 if (value.isMember(field.c_str()))
106 {
107 return ReadInteger(value, field);
108 }
109 else
110 {
111 return defaultValue;
112 }
113 }
114
115
101 unsigned int ReadUnsignedInteger(const Json::Value& value, 116 unsigned int ReadUnsignedInteger(const Json::Value& value,
102 const std::string& field) 117 const std::string& field)
103 { 118 {
104 int tmp = ReadInteger(value, field); 119 int tmp = ReadInteger(value, field);
105 120