X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstyle.cpp;h=d53ae240fcea168a1b4659e6d8ac4472ec79f69c;hb=HEAD;hp=acbdff54febbda18dce5df7a7cc265fb16e2a647;hpb=b4a3d651f57c46507aaa99a71a14fea15f0e430d;p=libs%2Fgltk.git diff --git a/source/style.cpp b/source/style.cpp index acbdff5..ddca1c4 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -7,12 +7,6 @@ using namespace std; namespace Msp { namespace GLtk { -Style::Style(): - font(0), - font_size(0), - sampler(0) -{ } - const GL::Font &Style::get_font() const { if(!font) @@ -35,10 +29,10 @@ const GL::Sampler &Style::get_sampler() const return *sampler; } -const Part *Style::get_part(const string &name) const +const Part *Style::find_part(const string &name) const { auto i = find_if(parts, [&name](const Part &p){ return p.get_name()==name; }); - return (i!=parts.end() ? &*i : 0); + return (i!=parts.end() ? &*i : nullptr); } bool Style::compare_states(State s1, State s2) const