]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/style.cpp
Use nullptr instead of 0 for pointers
[libs/gltk.git] / source / style.cpp
index acbdff54febbda18dce5df7a7cc265fb16e2a647..a339c0cb2bd913f2e336228cd0fb3fd2c63afb36 100644 (file)
@@ -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)
@@ -38,7 +32,7 @@ const GL::Sampler &Style::get_sampler() const
 const Part *Style::get_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