Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2019-08-16 17:17:37 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-08-16 17:17:37 +0300
commit7e0199746ef683c2bda80c5649b5c4150880a9c3 (patch)
tree68e994c183521fa7248a332f574995b7ac0e773b /src/libigl
parent7d25d8c677cc0edbba469e2a54658ed9468efa60 (diff)
more clang warnings enabled, performance measuring
Succesfull build on mingw-w64 fix sandboxes Mingw fixes and full parallel support tree gen.
Diffstat (limited to 'src/libigl')
-rw-r--r--src/libigl/igl/SortableRow.h82
1 files changed, 39 insertions, 43 deletions
diff --git a/src/libigl/igl/SortableRow.h b/src/libigl/igl/SortableRow.h
index 5f172987b..182bf8134 100644
--- a/src/libigl/igl/SortableRow.h
+++ b/src/libigl/igl/SortableRow.h
@@ -1,9 +1,9 @@
// This file is part of libigl, a simple c++ geometry processing library.
-//
+//
// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
-//
-// This Source Code Form is subject to the terms of the Mozilla Public License
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
#ifndef IGL_SORTABLE_ROW_H
#define IGL_SORTABLE_ROW_H
@@ -14,57 +14,53 @@
namespace igl
{
- // Templates:
- // T should be a matrix that implements .size(), and operator(int i)
- template <typename T>
- class SortableRow
- {
- public:
- T data;
- public:
- SortableRow():data(){};
- SortableRow(const T & data):data(data){};
- bool operator<(const SortableRow & that) const
- {
- // Get reference so that I can use parenthesis
- const SortableRow<T> & THIS = *this;
+// Templates:
+// T should be a matrix that implements .size(), and operator(int i)
+template <typename T>
+class SortableRow
+{
+public:
+ T data;
+public:
+ SortableRow():data(){};
+ SortableRow(const T & data):data(data){};
+ bool operator<(const SortableRow & that) const
+ {
// 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
for(int i = 0;i<minc;i++)
{
- if(THIS.data(i) == that.data(i))
- {
- continue;
- }
- return THIS.data(i) < that.data(i);
+ if(this->data(i) == that.data(i))
+ {
+ continue;
+ }
+ return this->data(i) < that.data(i);
}
// All characters the same, comes done to length
- return THIS.data.size()<that.data.size();
- };
- 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())
+ return this->data.size()<that.data.size();
+ };
+ bool operator==(const SortableRow & that) const
+ {
+ 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))
- {
- return false;
- }
+ if(this->data(i) != that.data(i))
+ {
+ return false;
+ }
}
return true;
- };
- bool operator!=(const SortableRow & that) const
- {
+ };
+ bool operator!=(const SortableRow & that) const
+ {
return !(*this == that);
- };
- };
+ };
+};
}
#endif