Skip to content

Commit

Permalink
Move in generateGridVertices if c++11 is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-ogre committed Oct 27, 2021
1 parent 6e86109 commit 8f1b434
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CDT/extras/InitializeWithGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include "CDT.h"
#include "CDTUtils.h"

#ifdef CDT_CXX11_IS_SUPPORTED
#include <algorithm>
#endif
#include <cstddef>
#include <iterator>
#include <vector>
Expand Down Expand Up @@ -85,7 +88,11 @@ void generateGridVertices(
vTris.push_back(2 * (i - xres));
vTris.push_back(2 * (i - xres) + 1);
}
#ifdef CDT_CXX11_IS_SUPPORTED
*outTrisFirst++ = std::move(vTris);
#else
*outTrisFirst++ = vTris;
#endif
}
}
}
Expand Down

1 comment on commit 8f1b434

@zhivkob
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep forgetting you are supporting compilers all the way back to c++98. Thanks!

Please sign in to comment.