X-Git-Url: http://git.tdb.fi/?p=poefilter.git;a=blobdiff_plain;f=source%2Ffilter.cpp;h=02f8c3f6ccf278b1ab974e894f7aa2f09ff1304f;hp=0f7a20e99ec929d03a2b2c5b07cfc52bbe4d71c7;hb=d0663f70ea5caea2db3c6d3c846ec67410db3498;hpb=affc72bbd6ef9bcf2c5f94553a53582d42d40cc2 diff --git a/source/filter.cpp b/source/filter.cpp index 0f7a20e..02f8c3f 100644 --- a/source/filter.cpp +++ b/source/filter.cpp @@ -94,7 +94,7 @@ bool Filter::Loader::category_order(const Category *c1, const Category *c2) void Filter::Loader::add_categories(const string &name, bool show) { - list categs; + vector categs; if(name.find('*')!=string::npos) { poe.find_categories(glob_to_re(name), categs); @@ -102,12 +102,12 @@ void Filter::Loader::add_categories(const string &name, bool show) if(categs.empty()) throw key_error(name); - categs.sort(&category_order); + sort(categs, &category_order); } else categs.push_back(&poe.get_category(name)); - for(list::const_iterator i=categs.begin(); i!=categs.end(); ++i) + for(vector::const_iterator i=categs.begin(); i!=categs.end(); ++i) { bool found = false; for(list::const_iterator j=obj.blocks.begin(); (!found && j!=obj.blocks.end()); ++j) @@ -128,7 +128,7 @@ void Filter::Loader::add_categories(const string &name, bool show) void Filter::Loader::cancel(const string &name) { - list categs; + vector categs; if(name.find('*')!=string::npos) { poe.find_categories(glob_to_re(name), categs); @@ -139,7 +139,7 @@ void Filter::Loader::cancel(const string &name) else categs.push_back(&poe.get_category(name)); - for(list::const_iterator i=categs.begin(); i!=categs.end(); ++i) + for(vector::const_iterator i=categs.begin(); i!=categs.end(); ++i) for(list::iterator j=obj.blocks.begin(); j!=obj.blocks.end(); ++j) if(j->category==*i) {