Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: reverse() and sort() not declared #126

Open
mid-kid opened this issue May 5, 2021 · 0 comments
Open

Build error: reverse() and sort() not declared #126

mid-kid opened this issue May 5, 2021 · 0 comments

Comments

@mid-kid
Copy link

mid-kid commented May 5, 2021

I get the following build errors on linux with GCC 10 and boost 1.75.0:

common/geometry/shape_line_chain.cpp: In member function 'const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const':
common/geometry/shape_line_chain.cpp:65:5: error: 'reverse' was not declared in this scope; did you mean 'Reverse'?
   65 |     reverse( a.m_points.begin(), a.m_points.end() );
      |     ^~~~~~~
      |     Reverse
common/geometry/shape_line_chain.cpp: In member function 'int SHAPE_LINE_CHAIN::Intersect(const SEG&, SHAPE_LINE_CHAIN::INTERSECTIONS&) const':
common/geometry/shape_line_chain.cpp:247:5: error: 'sort' was not declared in this scope; did you mean 'qsort'?
  247 |     sort( aIp.begin(), aIp.end(), comp );
      |     ^~~~
      |     qsort

To fix them, I've added #include <algorithm> at the top of common/geometry/shape_line_chain.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant