コード例 #1
0
//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();
}
コード例 #2
0
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_;
}
コード例 #3
0
bool resource_directory::id_entry_finder::operator()(const resource_directory_entry& entry) const
{
    return !entry.is_named() && entry.get_id() == id_;
}