FIX: Fix missing std::accumulate declaration
/run/build/BambuStudio/src/libslic3r/ExPolygon.cpp: In function ‘double Slic3r::get_expolygons_area(const ExPolygons&)’: /run/build/BambuStudio/src/libslic3r/ExPolygon.cpp:437:17: error: ‘accumulate’ is not a member of ‘std’ 437 | return std::accumulate(expolys.begin(), expolys.end(), (double)(0), [](double val, const ExPolygon& expoly) { | ^~~~~~~~~~ /run/build/BambuStudio/src/libslic3r/Polygon.cpp: In member function ‘bool Slic3r::Polygon::is_approx_circle(double, double, Slic3r::Point&, double&) const’: /run/build/BambuStudio/src/libslic3r/Polygon.cpp:122:28: error: ‘accumulate’ is not a member of ‘std’ 122 | double avg_dist = std::accumulate(distances.begin(), distances.end(), 0.0) / distances.size(); | ^~~~~~~~~~
This commit is contained in:
parent
159de8dc65
commit
c15d402bde
|
@ -9,6 +9,7 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <list>
|
||||
#include <numeric>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include "Polygon.hpp"
|
||||
#include "Polyline.hpp"
|
||||
|
||||
#include <numeric>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
double Polygon::length() const
|
||||
|
|
Loading…
Reference in New Issue