diff --git a/uppsrc/Core/Socket.cpp b/uppsrc/Core/Socket.cpp index f54b4939b..6a3f602f7 100644 --- a/uppsrc/Core/Socket.cpp +++ b/uppsrc/Core/Socket.cpp @@ -798,7 +798,7 @@ int TcpSocket::Get(void *buffer, int count) int l = (int)(end - ptr); done = 0; - if(l > 0) + if(l > 0) { if(l < count) { memcpy(buffer, ptr, l); done += l; @@ -809,6 +809,7 @@ int TcpSocket::Get(void *buffer, int count) ptr += count; return count; } + } int end_time = GetEndTime(); while(done < count && !IsError() && !IsEof()) { if(!Wait(WAIT_READ, end_time)) @@ -864,11 +865,12 @@ String TcpSocket::GetLine(int maxlen) return String::GetVoid(); int c = Peek(end_time); if(c < 0) { - if(!IsError()) + if(!IsError()) { if(msecs() > end_time) SetSockError("GetLine", -1, "timeout"); else continue; + } return String::GetVoid(); } Get(); diff --git a/uppsrc/CtrlCore/CtrlClip.cpp b/uppsrc/CtrlCore/CtrlClip.cpp index fbd7ed28e..9960b1a42 100644 --- a/uppsrc/CtrlCore/CtrlClip.cpp +++ b/uppsrc/CtrlCore/CtrlClip.cpp @@ -224,7 +224,7 @@ void Ctrl::DnD(Point p, PasteClip& clip) Ptr ctrl = this; while(ctrl && ctrl->IsEnabled()) { Rect view = ctrl->GetScreenView(); - if(ctrl->IsMouseActive()) + if(ctrl->IsMouseActive()) { if(view.Contains(p)) { dndpos = p - view.TopLeft(); dndframe = false; @@ -239,6 +239,7 @@ void Ctrl::DnD(Point p, PasteClip& clip) if(clip.IsAccepted()) break; } + } ctrl = ctrl->ChildFromPoint(hp); } if(ctrl != dndctrl) { diff --git a/uppsrc/CtrlCore/CtrlDraw.cpp b/uppsrc/CtrlCore/CtrlDraw.cpp index 4e0828839..91ffbd14d 100644 --- a/uppsrc/CtrlCore/CtrlDraw.cpp +++ b/uppsrc/CtrlCore/CtrlDraw.cpp @@ -362,7 +362,7 @@ void Ctrl::CtrlPaint(SystemDraw& w, const Rect& clip) { bool hasviewctrls = false; bool viewexcluded = false; for(q = firstchild; q; q = q->next) - if(q->IsShown()) + if(q->IsShown()) { if(q->InFrame()) { if(!viewexcluded && IsTransparent() && q->GetRect().Intersects(view)) { w.Begin(); @@ -377,6 +377,7 @@ void Ctrl::CtrlPaint(SystemDraw& w, const Rect& clip) { } else hasviewctrls = true; + } if(viewexcluded) w.End(); DOLEVELCHECK; diff --git a/uppsrc/CtrlCore/CtrlMouse.cpp b/uppsrc/CtrlCore/CtrlMouse.cpp index ffb7016de..f5edfeda7 100644 --- a/uppsrc/CtrlCore/CtrlMouse.cpp +++ b/uppsrc/CtrlCore/CtrlMouse.cpp @@ -329,13 +329,14 @@ Image Ctrl::MEvent0(int e, Point p, int zd) mouseinview = inview; MouseEventH(inview ? MOUSEENTER : MOUSELEAVE, p, zd, GetMouseFlags() | mm); } - if(_this) + if(_this) { if(view.Contains(p) || HasCapture()) { p -= view.TopLeft(); return MouseEventH(e, p, zd, GetMouseFlags() | mm); } else return FrameMouseEventH(e, p, zd, GetMouseFlags() | mm); + } return Image::Arrow(); } diff --git a/uppsrc/CtrlCore/CtrlPos.cpp b/uppsrc/CtrlCore/CtrlPos.cpp index f4693b4a4..f3dfbeeeb 100644 --- a/uppsrc/CtrlCore/CtrlPos.cpp +++ b/uppsrc/CtrlCore/CtrlPos.cpp @@ -371,11 +371,12 @@ void Ctrl::RemoveFrame(int i) { int n = frame.GetCount(); Mitor m; if(n > 1) - for(int q = 0; q < n; q++) + for(int q = 0; q < n; q++) { if(q != i) m.Add().frame = frame[q].frame; else frame[q].frame->FrameRemove(); + } frame = pick(m); if(frame.GetCount() == 0) frame.Add().frame = &NullFrame(); diff --git a/uppsrc/CtrlCore/ParseRTF.cpp b/uppsrc/CtrlCore/ParseRTF.cpp index 03270cab6..927b129b2 100644 --- a/uppsrc/CtrlCore/ParseRTF.cpp +++ b/uppsrc/CtrlCore/ParseRTF.cpp @@ -1081,9 +1081,8 @@ String RTFParser::ReadBinHex(char& odd) const : *s >= 'A' && *s <= 'F' ? *s - 'A' + 10 : *s >= 'a' && *s <= 'f' ? *s - 'a' + 10 : 255); - if(w < 16) - if(v >= 16) - { + if(w < 16) { + if(v >= 16) { t = *s; v = w; } @@ -1092,6 +1091,7 @@ String RTFParser::ReadBinHex(char& odd) const out.Cat(16 * v + w); v = 255; } + } } odd = (v < 16 ? t : 0); return out; diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index 80b65ab78..eca035e43 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -747,11 +747,12 @@ void ArrayCtrl::ChildGotFocus() RefreshRow(cursor); if(!acceptingrow) { Point p = FindCellCtrl(GetFocusCtrl()); - if(!IsNull(p)) + if(!IsNull(p)) { if(nocursor) ScrollInto(p.y); else SetCursor(p.y); + } } Ctrl::ChildGotFocus(); } @@ -834,7 +835,7 @@ Size ArrayCtrl::DoPaint(Draw& w, bool sample) { Color fg, bg; Value q; const Display& d = GetCellInfo(i, jj, hasfocus0, q, fg, bg, st); - if(sample || w.IsPainting(r)) + if(sample || w.IsPainting(r)) { if(cw < 2 * cm || editmode && i == cursor && column[jj].edit) d.PaintBackground(w, r, q, fg, bg, st); else { @@ -846,6 +847,7 @@ Size ArrayCtrl::DoPaint(Draw& w, bool sample) { GetDisplay(i, jj).Paint(w, r, q, fg, bg, st); w.End(); } + } x += cw; if(vertgrid) w.DrawRect(x - 1, r.top, 1, r.Height(), gridcolor); diff --git a/uppsrc/CtrlLib/ChGtk.cpp b/uppsrc/CtrlLib/ChGtk.cpp index 6a4b50cfc..a5bc1753f 100644 --- a/uppsrc/CtrlLib/ChGtk.cpp +++ b/uppsrc/CtrlLib/ChGtk.cpp @@ -123,7 +123,7 @@ void ChHostSkin() face = String(~face, q); } fontname = Font::FindFaceNameIndex(face); - if(fontname == 0) + if(fontname == 0) { if(ToUpper(face[0]) == 'M') fontname = Font::COURIER; else @@ -131,6 +131,7 @@ void ChHostSkin() fontname = Font::ROMAN; else fontname = Font::ARIAL; + } } } diff --git a/uppsrc/CtrlLib/ColorPopup.cpp b/uppsrc/CtrlLib/ColorPopup.cpp index 0820f8c20..8ed73deff 100644 --- a/uppsrc/CtrlLib/ColorPopup.cpp +++ b/uppsrc/CtrlLib/ColorPopup.cpp @@ -226,11 +226,12 @@ void ColorPopUp::Paint(Draw& w) DrawFilledFrame(w, r, SColorText, color); r.Inflate(1); - if(colori == 999) + if(colori == 999) { if(GetMouseLeft()) DrawFrame(w, r, SColorShadow, SColorLight); else DrawFrame(w, r, GUI_GlobalStyle() >= GUISTYLE_XP ? SColorText : SColorHighlight); + } } return; } @@ -239,11 +240,12 @@ void ColorPopUp::Paint(Draw& w) if(i < 18 && scolors) DrawFrame(w, x + 2, y + 1, 12, 12, Blend(SColorLight, SColorHighlight)); - if(i == colori) + if(i == colori) { if(GetMouseLeft()) DrawFrame(w, x, y - 1, 16, 16, SColorShadow, SColorLight); else DrawFrame(w, x, y - 1, 16, 16, GUI_GlobalStyle() >= GUISTYLE_XP ? SColorText : SColorHighlight); + } i++; } y += 16; diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 9ccd0a3be..ef6cd6293 100644 --- a/uppsrc/CtrlLib/FileSel.cpp +++ b/uppsrc/CtrlLib/FileSel.cpp @@ -855,11 +855,12 @@ void FileSel::SearchLoad() if(!IsEmpty(basedir) && String(~dir).IsEmpty()) dirup.Disable(); olddir = ~dir; - if(olddir.GetCount() || basedir.GetCount()) + if(olddir.GetCount() || basedir.GetCount()) { if(sortext && mode != SELECTDIR) SortByExt(list); else SortByName(list); + } Update(); #ifdef GUI_WIN lazyicons.Start(list, d, WhenIcon); @@ -968,7 +969,7 @@ void FileSel::Finish() { Exclamation(p + t_(" is directory.")); return; } - if(asking) + if(asking) { if(mode == SAVEAS) { if(!ff.IsEmpty() && !PromptOKCancel(p + t_(" already exists.&Do you want to continue ?"))) return; @@ -979,6 +980,7 @@ void FileSel::Finish() { nonexist << p; ne++; } + } } if(ne) { nonexist << (ne == 1 ? t_(" does not exist.") : t_("&do not exist.")); @@ -1196,14 +1198,14 @@ void FileSel::DirUp() { void FileSel::MkDir() { if(String(~dir).IsEmpty() && basedir.IsEmpty()) return; String name, error; - if(EditText(name, t_("New directory"), t_("Name")) && !name.IsEmpty()) - if(filesystem->CreateFolder(FilePath(name), error)) - { + if(EditText(name, t_("New directory"), t_("Name")) && !name.IsEmpty()) { + if(filesystem->CreateFolder(FilePath(name), error)) { Load(); list.FindSetCursor(name); } else Exclamation(t_("[A3* Creating directory failed !&&]") + error); + } } void FileSel::PlusMinus(const char *title, bool sel) { diff --git a/uppsrc/CtrlLib/MenuItem.cpp b/uppsrc/CtrlLib/MenuItem.cpp index e726c50f5..b05b89113 100644 --- a/uppsrc/CtrlLib/MenuItem.cpp +++ b/uppsrc/CtrlLib/MenuItem.cpp @@ -282,11 +282,12 @@ void MenuItem::Paint(Draw& w) bool hl = state != NORMAL; Size sz = GetSize(); - if(hl) + if(hl) { if(GUI_GlobalStyle() >= GUISTYLE_XP) ChPaint(w, 0, 0, sz.cx, sz.cy, style->item); else w.DrawRect(sz, SColorHighlight); + } UPP::Image li = licon; if(li.IsEmpty()) { switch(type) { diff --git a/uppsrc/CtrlLib/TreeCtrl.cpp b/uppsrc/CtrlLib/TreeCtrl.cpp index 54011bf1d..720aa54fd 100644 --- a/uppsrc/CtrlLib/TreeCtrl.cpp +++ b/uppsrc/CtrlLib/TreeCtrl.cpp @@ -1458,13 +1458,14 @@ bool TreeCtrl::DnDInserti(int ii, PasteClip& d, bool bottom) int parent = GetParent(itemi); int childi = GetChildIndex(parent, itemi); int ins = -1; - if(bottom) + if(bottom) { if(childi != GetChildCount(parent) - 1 && ii + 1 < line.GetCount()) return DnDInserti(ii + 1, d, false); else { childi++; ins = 1; } + } WhenDropInsert(parent, childi, d); if(d.IsAccepted()) { DnD(itemi, ins); diff --git a/uppsrc/CtrlLib/init b/uppsrc/CtrlLib/init index 3c90182ca..824dec6ba 100644 --- a/uppsrc/CtrlLib/init +++ b/uppsrc/CtrlLib/init @@ -2,7 +2,7 @@ #define _CtrlLib_icpp_init_stub #include "CtrlCore/init" #include "PdfDraw/init" -#define BLITZ_INDEX__ Fa588a2a7bb40a3ed36760f6c2bef5026 +#define BLITZ_INDEX__ F2a95805f3896075b0a556396aabaf515 #include "CtrlLib.icpp" #undef BLITZ_INDEX__ #endif diff --git a/uppsrc/Draw/DDARasterizer.cpp b/uppsrc/Draw/DDARasterizer.cpp index ba8299a82..c40827183 100644 --- a/uppsrc/Draw/DDARasterizer.cpp +++ b/uppsrc/Draw/DDARasterizer.cpp @@ -14,20 +14,22 @@ DDARasterizer::DDARasterizer() void DDARasterizer::AHorz(int x, int y, int cx) { - if(cx) + if(cx) { if(cx < 0) PutHorz(x + cx + 1, y, -cx); else PutHorz(x, y, cx); + } } void DDARasterizer::AVert(int x, int y, int cy) { - if(cy) + if(cy) { if(cy < 0) PutVert(x, y + cy + 1, -cy); else PutVert(x, y, cy); + } } void DDARasterizer::DoLine(Point p1, Point p2, bool last) diff --git a/uppsrc/Draw/Font.cpp b/uppsrc/Draw/Font.cpp index cb8acbbb0..22675dfa9 100644 --- a/uppsrc/Draw/Font.cpp +++ b/uppsrc/Draw/Font.cpp @@ -253,7 +253,7 @@ void Font::Serialize(Stream& s) { name = GetFaceName(); s % name; } - if(s.IsLoading()) + if(s.IsLoading()) { if(f >= 0) Face(f); else { @@ -261,6 +261,7 @@ void Font::Serialize(Stream& s) { if(IsNull(name)) SetNull(); } + } } else { String name = GetFaceName(); diff --git a/uppsrc/RichText/EncodeQtf.cpp b/uppsrc/RichText/EncodeQtf.cpp index e4db584eb..d72ff1f86 100644 --- a/uppsrc/RichText/EncodeQtf.cpp +++ b/uppsrc/RichText/EncodeQtf.cpp @@ -24,7 +24,7 @@ String QtfFormat(Color c) void LngFmt(String& fmt, dword l, dword lang) { - if(lang != (dword)l) + if(lang != (dword)l) { if(l == 0) fmt << "%-"; else @@ -32,6 +32,7 @@ void LngFmt(String& fmt, dword l, dword lang) fmt << "%%"; else fmt << "%" << LNGAsText(l); + } } void CharFmt(String& fmt, const RichPara::CharFormat& a, const RichPara::CharFormat& b) diff --git a/uppsrc/RichText/ParaPaint.cpp b/uppsrc/RichText/ParaPaint.cpp index 62c1294f5..fb677d18d 100644 --- a/uppsrc/RichText/ParaPaint.cpp +++ b/uppsrc/RichText/ParaPaint.cpp @@ -39,12 +39,13 @@ void RichPara::Flush(Draw& draw, const PaintInfo& pi, wchar *text, int width = z * x - z * x0; int zy0 = z * y0; int zx0 = z * x0; - if(!IsNull(f.indexentry) && !IsNull(pi.indexentry)) + if(!IsNull(f.indexentry) && !IsNull(pi.indexentry)) { if(pi.indexentrybg) draw.DrawRect(zx0, z * y, width, z * (y + linecy) - z * y, pi.coloroverride ? SColorPaper() : pi.indexentry); else draw.DrawRect(zx0, zy0, width, 2, pi.indexentry); + } if(!IsNull(f.paper) && !highlight) draw.DrawRect(zx0, z * y, width, z * (y + linecy) - z * y, pi.coloroverride ? SColorPaper() : f.paper); diff --git a/uppsrc/RichText/TableData.cpp b/uppsrc/RichText/TableData.cpp index 39d06830c..155c94875 100644 --- a/uppsrc/RichText/TableData.cpp +++ b/uppsrc/RichText/TableData.cpp @@ -13,7 +13,7 @@ void RichTable::InvalidateRefresh(int i, int j) if(i < format.header) r_row = -1; else - if(r_row != i || r_column != j) + if(r_row != i || r_column != j) { if(r_row == -2 && clayout.sz == GetSize()) { r_row = i; r_column = j; @@ -23,6 +23,7 @@ void RichTable::InvalidateRefresh(int i, int j) } else r_row = -1; + } Invalidate(); } diff --git a/uppsrc/RichText/TxtPaint.cpp b/uppsrc/RichText/TxtPaint.cpp index fe08ce058..1af8c925a 100644 --- a/uppsrc/RichText/TxtPaint.cpp +++ b/uppsrc/RichText/TxtPaint.cpp @@ -192,7 +192,7 @@ RichCaret RichTxt::GetCaret(int pos, RichContext rc) const pos = GetLength(); while(parti < part.GetCount()) { int l = GetPartLength(parti) + 1; - if(pos < l) + if(pos < l) { if(IsTable(parti)) return GetTable(parti).GetCaret(pos, rc); else { @@ -210,6 +210,7 @@ RichCaret RichTxt::GetCaret(int pos, RichContext rc) const tp.textpage = rc.page; return tp; } + } pos -= l; rc.py = GetNextPageY(parti++, rc); } @@ -338,11 +339,12 @@ void RichTxt::GatherValPos(Vector& f, RichContext rc, int pos, int t nbefore = pp.before + pp.ruler; nline = pp.linecy[0]; } - if(p.haspos) + if(p.haspos) { if(type == LABELS) Get(parti, rc.styles, true).GatherLabels(f, rc.page, rc.py, pos, nbefore, nline); else Get(parti, rc.styles, true).GatherIndexes(f, rc.page, rc.py, pos, nbefore, nline); + } } pos += GetPartLength(parti) + 1; rc.py = GetNextPageY(parti++, rc);