]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/collection.cpp
Use nullptr instead of 0 for pointers
[libs/datafile.git] / source / collection.cpp
index d222568403355f4f3af1b1b0896a27f9311c7696..8e9543a0d1feef9717184c2a06d10c5e64f6f489 100644 (file)
@@ -8,7 +8,7 @@ namespace Msp {
 namespace DataFile {
 
 Collection::Collection():
-       fallback(0)
+       fallback(nullptr)
 { }
 
 Collection::~Collection()
@@ -67,7 +67,7 @@ const Variant *Collection::find_var(const string &name, const CollectionItemType
        }
 
        i = items.find(name);
-       return (i!=items.end() ? &i->second : 0);
+       return (i!=items.end() ? &i->second : nullptr);
 }
 
 void Collection::gather_items(vector<const Variant *> *vars, list<string> *names, const CollectionItemTypeBase &type, bool include_sources) const
@@ -107,7 +107,7 @@ CollectionItemTypeBase *Collection::get_type(const CollectionItemTypeBase &type)
        for(CollectionItemTypeBase *t: types)
                if(t->is_same_type(type))
                        return t;
-       return 0;
+       return nullptr;
 }
 
 CollectionItemTypeBase *Collection::get_type_for_item(const Variant &var) const
@@ -115,7 +115,7 @@ CollectionItemTypeBase *Collection::get_type_for_item(const Variant &var) const
        for(CollectionItemTypeBase *t: types)
                if(t->check_item_type(var))
                        return t;
-       return 0;
+       return nullptr;
 }
 
 void Collection::add_source(const CollectionSource &s)
@@ -129,7 +129,7 @@ IO::Seekable *Collection::open_raw(const string &name) const
                if(IO::Seekable *io = s->open(name))
                        return io;
 
-       return 0;
+       return nullptr;
 }
 
 void Collection::gather_names_from_sources(list<string> &names, const CollectionItemTypeBase &type) const