]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/style.cpp
Rename some get functions as find because they can return null
[libs/gltk.git] / source / style.cpp
index a339c0cb2bd913f2e336228cd0fb3fd2c63afb36..ddca1c454060ae9ba3f3d5dadae568996981dda6 100644 (file)
@@ -29,7 +29,7 @@ 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 : nullptr);