|
@@ -1,5 +1,5 @@
|
|
|
// This file is part of libigl, a simple c++ geometry processing library.
|
|
// This file is part of libigl, a simple c++ geometry processing library.
|
|
|
-//
|
|
|
|
|
|
|
+//
|
|
|
// Copyright (C) 2013 Alec Jacobson <[email protected]>
|
|
// Copyright (C) 2013 Alec Jacobson <[email protected]>
|
|
|
//
|
|
//
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
@@ -26,34 +26,30 @@ namespace igl
|
|
|
SortableRow(const T & data):data(data){};
|
|
SortableRow(const T & data):data(data){};
|
|
|
bool operator<(const SortableRow & that) const
|
|
bool operator<(const SortableRow & that) const
|
|
|
{
|
|
{
|
|
|
- // Get reference so that I can use parenthesis
|
|
|
|
|
- const SortableRow<T> & THIS = *this;
|
|
|
|
|
// Lexicographical
|
|
// Lexicographical
|
|
|
- int minc = (THIS.data.size() < that.data.size()?
|
|
|
|
|
- THIS.data.size() : that.data.size());
|
|
|
|
|
|
|
+ int minc = (this->data.size() < that.data.size()?
|
|
|
|
|
+ this->data.size() : that.data.size());
|
|
|
// loop over columns
|
|
// loop over columns
|
|
|
for(int i = 0;i<minc;i++)
|
|
for(int i = 0;i<minc;i++)
|
|
|
{
|
|
{
|
|
|
- if(THIS.data(i) == that.data(i))
|
|
|
|
|
|
|
+ if(this->data(i) == that.data(i))
|
|
|
{
|
|
{
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- return THIS.data(i) < that.data(i);
|
|
|
|
|
|
|
+ return this->data(i) < that.data(i);
|
|
|
}
|
|
}
|
|
|
// All characters the same, comes done to length
|
|
// All characters the same, comes done to length
|
|
|
- return THIS.data.size()<that.data.size();
|
|
|
|
|
|
|
+ return this->data.size()<that.data.size();
|
|
|
};
|
|
};
|
|
|
bool operator==(const SortableRow & that) const
|
|
bool operator==(const SortableRow & that) const
|
|
|
{
|
|
{
|
|
|
- // Get reference so that I can use parenthesis
|
|
|
|
|
- const SortableRow<T> & THIS = *this;
|
|
|
|
|
- if(THIS.data.size() != that.data.size())
|
|
|
|
|
|
|
+ if(this->data.size() != that.data.size())
|
|
|
{
|
|
{
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- for(int i = 0;i<THIS.data.size();i++)
|
|
|
|
|
|
|
+ for(int i = 0;i<this->data.size();i++)
|
|
|
{
|
|
{
|
|
|
- if(THIS.data(i) != that.data(i))
|
|
|
|
|
|
|
+ if(this->data(i) != that.data(i))
|
|
|
{
|
|
{
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|