X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fcollection.cpp;fp=source%2Fcollection.cpp;h=8e9543a0d1feef9717184c2a06d10c5e64f6f489;hp=d222568403355f4f3af1b1b0896a27f9311c7696;hb=daca21051927eabee098e422fe5a0990acacfb96;hpb=9d0291952255969770e4978a0fe9e7e4839359c8 diff --git a/source/collection.cpp b/source/collection.cpp index d222568..8e9543a 100644 --- a/source/collection.cpp +++ b/source/collection.cpp @@ -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 *vars, list *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 &names, const CollectionItemTypeBase &type) const