1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Forgot to remove some old code that didn't do anything

This commit is contained in:
Alexander "Ace" Olofsson 2012-03-30 14:50:39 +02:00
parent 4a9a416d46
commit d2f8539a42

View file

@ -50,31 +50,12 @@ struct pathComparer
private:
int m_start, m_size;
bool comparePortion(const std::string& file1, const std::string& file2, int start, int size) const
{
return lexicographical_compare(file1.substr(start,size), file2.substr(start,size), boost::algorithm::is_iless());
for(int i = start; i < start+size; i++)
{
if (i >= file1.size())
return true;
else if (i >= file2.size())
return false;
char one = tolower(file1.at(i));
char two = tolower(file2.at(i));
if(one != two)
return (one < two);
}
return false;
}
public:
pathComparer(int start, int size) : m_start(start), m_size(size) { }
bool operator() (const std::string& first, const std::string& other)
{
return comparePortion(first, other, m_start, m_size);
return lexicographical_compare(first.substr(m_start,m_size), other.substr(m_start,m_size), boost::algorithm::is_iless());
}
};