From 982a9be5d39fb042e1deb86af5930cb54729f83f Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 15 Dec 2013 10:46:39 +1100 Subject: Format normalization - whitespace and braces made consistent. Parameter names added to method declarations. --- gtk/PlatGTK.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 427f08ec3..f3a75466e 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -48,7 +48,7 @@ static const double kPi = 3.14159265358979323846; -// The Pango version guard for pango_units_from_double and pango_units_to_double +// The Pango version guard for pango_units_from_double and pango_units_to_double // is more complex than simply implementing these here. static int pangoUnitsFromDouble(double d) { @@ -339,7 +339,7 @@ void FontCached::ReleaseAll() { FontID FontCached::CreateNewFont(const FontParameters &fp) { PangoFontDescription *pfd = pango_font_description_new(); if (pfd) { - pango_font_description_set_family(pfd, + pango_font_description_set_family(pfd, (fp.faceName[0] == '!') ? fp.faceName+1 : fp.faceName); pango_font_description_set_size(pfd, pangoUnitsFromDouble(fp.size)); pango_font_description_set_weight(pfd, static_cast(fp.weight)); @@ -666,7 +666,7 @@ void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(back); cairo_move_to(context, pts[0].x + 0.5, pts[0].y + 0.5); - for (int i = 1;i < npts;i++) { + for (int i = 1; i < npts; i++) { cairo_line_to(context, pts[i].x + 0.5, pts[i].y + 0.5); } cairo_close_path(context); @@ -842,7 +842,7 @@ void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { std::string UTF8FromLatin1(const char *s, int len) { std::string utfForm(len*2 + 1, '\0'); size_t lenU = 0; - for (int i=0;i(s[i]); if (uch < 0x80) { utfForm[lenU++] = uch; @@ -936,7 +936,7 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { // Avoid drawing spaces in transparent mode - for (int i=0;i(fn_address); else return NULL; - } else + } else { return NULL; + } } virtual bool IsValid() { -- cgit v1.2.3