ZipFile::sortEntriesByFileName


#1

Hi Jules,

Maybe this is be useful often enough to be integrated in juce_ZipFile.cpp :

[code]class ZipEntryInfoFilenameComparator : public ElementComparator<void*>
{
int compareElements (void* first, void* second) throw()
{
return ((const ZipEntryInfo*) first)->entry.filename.compare(((const ZipEntryInfo*) second)->entry.filename);
}
};

void ZipFile::sortEntriesByFileName ()
{
ZipEntryInfoFilenameComparator comp;
entries.sort (comp);
}[/code]


#2

Yeah, I guess that can go in - thanks!


#3