]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/collection.cpp
Cosmetic changes
[libs/datafile.git] / source / collection.cpp
index d222568403355f4f3af1b1b0896a27f9311c7696..e1c25ddc914e6afd0f2be1b8e4ef198846c5c209 100644 (file)
@@ -7,10 +7,6 @@ using namespace std;
 namespace Msp {
 namespace DataFile {
 
-Collection::Collection():
-       fallback(0)
-{ }
-
 Collection::~Collection()
 {
        for(CollectionItemTypeBase *t: types)
@@ -67,7 +63,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 +103,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 +111,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 +125,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