//Helper function to rebuild resource directory bool entry_sorter::operator()(const resource_directory_entry& entry1, const resource_directory_entry& entry2) const { if(entry1.is_named() && entry2.is_named()) return entry1.get_name() < entry2.get_name(); else if(!entry1.is_named() && !entry2.is_named()) return entry1.get_id() < entry2.get_id(); else return entry1.is_named(); }
bool resource_directory::entry_finder::operator()(const resource_directory_entry& entry) const { if(named_) return entry.is_named() && entry.get_name() == name_; else return !entry.is_named() && entry.get_id() == id_; }
bool resource_directory::name_entry_finder::operator()(const resource_directory_entry& entry) const { return entry.is_named() && entry.get_name() == name_; }