mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-10 03:54:54 -06:00
,cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@7139 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c1498bc874
commit
91cd8d30c1
4 changed files with 10 additions and 5 deletions
|
|
@ -192,7 +192,7 @@ template<> void Jsonize(JsonIO& io, int& var)
|
|||
{
|
||||
double v = IntDbl(var);
|
||||
Jsonize(io, v);
|
||||
if(io.IsLoading())
|
||||
if(io.IsLoading()) {
|
||||
if(IsNull(v))
|
||||
var = Null;
|
||||
else
|
||||
|
|
@ -200,17 +200,19 @@ template<> void Jsonize(JsonIO& io, int& var)
|
|||
var = (int)v;
|
||||
else
|
||||
throw JsonizeError("number is not integer");
|
||||
}
|
||||
}
|
||||
|
||||
template<> void Jsonize(JsonIO& io, int16& var)
|
||||
{
|
||||
double v = var;
|
||||
Jsonize(io, v);
|
||||
if(io.IsLoading())
|
||||
if(io.IsLoading()) {
|
||||
if(v >= -32768 && v <= 32767 && (int)v == v)
|
||||
var = (int16)v;
|
||||
else
|
||||
throw JsonizeError("16-bit integer expected");
|
||||
}
|
||||
}
|
||||
|
||||
template<> void Jsonize(JsonIO& io, bool& var)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue