mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Forgot to remove some old code that didn't do anything
This commit is contained in:
parent
4a9a416d46
commit
d2f8539a42
@ -50,31 +50,12 @@ struct pathComparer
|
|||||||
private:
|
private:
|
||||||
int m_start, m_size;
|
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:
|
public:
|
||||||
pathComparer(int start, int size) : m_start(start), m_size(size) { }
|
pathComparer(int start, int size) : m_start(start), m_size(size) { }
|
||||||
|
|
||||||
bool operator() (const std::string& first, const std::string& other)
|
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());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user