Mercurial > hg > orthanc
comparison Core/SerializationToolbox.cpp @ 3956:6e14f2da7c7e
integration transcoding->mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 May 2020 16:42:44 +0200 |
parents | 09798f2b985f |
children | 5d2348b39392 |
comparison
equal
deleted
inserted
replaced
3892:fe0e4ef52a72 | 3956:6e14f2da7c7e |
---|---|
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 |