Skip to content

Commit

Permalink
Some constructor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Oct 17, 2016
1 parent ac17531 commit e4640dd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions src/font/pango/font.hpp
Expand Up @@ -23,8 +23,8 @@ namespace font {
class p_font
{
public:
p_font(const std::string& name, const unsigned size, const unsigned style) :
font_(pango_font_description_new())
p_font(const std::string& name, const unsigned size, const unsigned style)
: font_(pango_font_description_new())
{
pango_font_description_set_family(font_, name.c_str());
pango_font_description_set_size(font_, size * PANGO_SCALE);
Expand Down
4 changes: 2 additions & 2 deletions src/font/pango/iter.hpp
Expand Up @@ -27,8 +27,8 @@ class p_itor
{
public:

explicit p_itor(PangoLayout* layout_) :
itor_(pango_layout_get_iter(layout_))
explicit p_itor(PangoLayout* layout_)
: itor_(pango_layout_get_iter(layout_))
{
}

Expand Down
50 changes: 25 additions & 25 deletions src/font/text.cpp
Expand Up @@ -39,34 +39,34 @@

namespace font {

ttext::ttext() :
ttext::ttext()
#if PANGO_VERSION_CHECK(1,22,0)
context_(pango_font_map_create_context(pango_cairo_font_map_get_default())),
: context_(pango_font_map_create_context(pango_cairo_font_map_get_default()))
#else
context_(pango_cairo_font_map_create_context((
reinterpret_cast<PangoCairoFontMap*>(pango_cairo_font_map_get_default())))),
, context_(pango_cairo_font_map_create_context((
reinterpret_cast<PangoCairoFontMap*>(pango_cairo_font_map_get_default()))))
#endif
layout_(pango_layout_new(context_)),
rect_(),
surface_(),
text_(),
markedup_text_(false),
link_aware_(false),
link_color_(),
font_class_(font::FONT_SANS_SERIF),
font_size_(14),
font_style_(STYLE_NORMAL),
foreground_color_(0xFFFFFFFF), // solid white
maximum_width_(-1),
characters_per_line_(0),
maximum_height_(-1),
ellipse_mode_(PANGO_ELLIPSIZE_END),
alignment_(PANGO_ALIGN_LEFT),
maximum_length_(std::string::npos),
calculation_dirty_(true),
length_(0),
surface_dirty_(true),
surface_buffer_()
, layout_(pango_layout_new(context_))
, rect_()
, surface_()
, text_()
, markedup_text_(false)
, link_aware_(false)
, link_color_()
, font_class_(font::FONT_SANS_SERIF)
, font_size_(14)
, font_style_(STYLE_NORMAL)
, foreground_color_(0xFFFFFFFF) // solid white
, maximum_width_(-1)
, characters_per_line_(0)
, maximum_height_(-1)
, ellipse_mode_(PANGO_ELLIPSIZE_END)
, alignment_(PANGO_ALIGN_LEFT)
, maximum_length_(std::string::npos)
, calculation_dirty_(true)
, length_(0)
, surface_dirty_(true)
, surface_buffer_()
{
// With 72 dpi the sizes are the same as with SDL_TTF so hardcoded.
pango_cairo_context_set_resolution(context_, 72.0);
Expand Down
24 changes: 12 additions & 12 deletions src/font/text_surface.cpp
Expand Up @@ -71,19 +71,19 @@ void text_surface::bidi_cvt()
#endif

text_surface::text_surface(std::string const &str, int size,
SDL_Color color, int style) :
hash_(0),
font_size_(size),
color_(color),
style_(style),
w_(-1),
h_(-1),
str_(str),
initialized_(false),
chunks_(),
surfs_()
SDL_Color color, int style)
: hash_(0)
, font_size_(size)
, color_(color)
, style_(style)
, w_(-1)
, h_(-1)
, str_(str)
, initialized_(false)
, chunks_()
, surfs_()
#ifdef HAVE_FRIBIDI
,is_rtl_(false)
, is_rtl_(false)
#endif
{
#ifdef HAVE_FRIBIDI
Expand Down

0 comments on commit e4640dd

Please sign in to comment.