mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
,cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@7139 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
79c25b3858
commit
9c17645f95
4 changed files with 10 additions and 5 deletions
|
|
@ -1995,7 +1995,7 @@ void CharSetData::Gen()
|
|||
line[0][c] = c;
|
||||
for(c = 0; c < 128; c++) {
|
||||
int q = table[c];
|
||||
if(q >= 128)
|
||||
if(q >= 128) {
|
||||
if(q < 16 * 128) {
|
||||
int i = q >> 7;
|
||||
if(!line[i]) {
|
||||
|
|
@ -2007,6 +2007,7 @@ void CharSetData::Gen()
|
|||
else
|
||||
if((q & 0xFF00) != 0xEE00)
|
||||
map.Add(q, c + 128);
|
||||
}
|
||||
}
|
||||
for(c = 0; c < 16; c++)
|
||||
if(!line[c])
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ wchar *WString0::Alloc(int& count)
|
|||
|
||||
void WString0::Free()
|
||||
{
|
||||
if(alloc > 0)
|
||||
if(alloc > 0) {
|
||||
if(IsRc()) {
|
||||
Atomic& rc = Rc();
|
||||
if(AtomicDec(rc) == 0)
|
||||
|
|
@ -26,6 +26,7 @@ void WString0::Free()
|
|||
}
|
||||
else
|
||||
MemoryFree48(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
|
|
|||
|
|
@ -889,11 +889,12 @@ XmlNode& XmlNode::SetAttr(const char *id, int i)
|
|||
|
||||
void XmlNode::Shrink()
|
||||
{
|
||||
if(attr)
|
||||
if(attr) {
|
||||
if(attr->GetCount() == 0)
|
||||
attr.Clear();
|
||||
else
|
||||
attr->Shrink();
|
||||
}
|
||||
node.Shrink();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue