Fix misleading indentation in Motif code

This commit contains whitespace-only changes (including adding one extra
new line) and no real ones.

Closes https://github.com/wxWidgets/wxWidgets/pull/1715
This commit is contained in:
Lauri Nurmi
2017-04-22 19:18:20 +03:00
committed by Vadim Zeitlin
parent 2d89c3fad0
commit 565034aa49
3 changed files with 24 additions and 23 deletions

View File

@@ -2211,26 +2211,26 @@ static void XCopyRemote(Display *src_display, Display *dest_display,
pixel = cachedest[k];
goto install;
}
if (all_cache)
for (k = CACHE_SIZE; k-- > cache_pos; )
if (cachesrc[k] == pixel) {
pixel = cachedest[k];
goto install;
}
if (all_cache)
for (k = CACHE_SIZE; k-- > cache_pos; )
if (cachesrc[k] == pixel) {
pixel = cachedest[k];
goto install;
}
cachesrc[cache_pos] = xcol.pixel = pixel;
XQueryColor(src_display, srccm, &xcol);
if (!XAllocColor(dest_display, destcm, &xcol))
xcol.pixel = 0;
cachedest[cache_pos] = pixel = xcol.pixel;
cachesrc[cache_pos] = xcol.pixel = pixel;
XQueryColor(src_display, srccm, &xcol);
if (!XAllocColor(dest_display, destcm, &xcol))
xcol.pixel = 0;
cachedest[cache_pos] = pixel = xcol.pixel;
if (++cache_pos >= CACHE_SIZE) {
cache_pos = 0;
all_cache = true;
}
if (++cache_pos >= CACHE_SIZE) {
cache_pos = 0;
all_cache = true;
}
install:
XPutPixel(destimage, i, j, pixel);
XPutPixel(destimage, i, j, pixel);
}
XPutImage(dest_display, dest, destgc, destimage, 0, 0, destx, desty, w, h);

View File

@@ -341,13 +341,13 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
for (i = 0; currentLine != lineNo && s[i]; i++ )
if (s[i] == '\n')
currentLine++;
// Now get the text
int j;
for (j = 0; s[i] && s[i] != '\n'; i++, j++ )
buf += s[i];
// Now get the text
int j;
for (j = 0; s[i] && s[i] != '\n'; i++, j++ )
buf += s[i];
XtFree(s);
return buf;
XtFree(s);
return buf;
}
else
return wxEmptyString;

View File

@@ -1230,7 +1230,8 @@ void wxWindow::DoGetClientSize(int *x, int *y) const
Widget widget = (Widget) GetClientWidget();
Dimension xx, yy;
XtVaGetValues(widget, XmNwidth, &xx, XmNheight, &yy, NULL);
if(x) *x = xx; if(y) *y = yy;
if(x) *x = xx;
if(y) *y = yy;
}
void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)