Fix of an undefined DBL_MAX on clang / OSX

This commit is contained in:
bubnikv 2019-01-11 11:46:54 +01:00
parent a552a7bc78
commit 1e21388fe9

View File

@ -13,6 +13,7 @@
#include "PrintExport.hpp" #include "PrintExport.hpp"
#include <algorithm> #include <algorithm>
#include <limits>
#include <unordered_set> #include <unordered_set>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
@ -1289,7 +1290,7 @@ std::string Print::validate() const
return L("The supplied settings will cause an empty print."); return L("The supplied settings will cause an empty print.");
// Find the smallest used nozzle diameter and the number of unique nozzle diameters. // Find the smallest used nozzle diameter and the number of unique nozzle diameters.
double min_nozzle_diameter = DBL_MAX; double min_nozzle_diameter = std::numeric_limits<double>::max();
double max_nozzle_diameter = 0; double max_nozzle_diameter = 0;
for (unsigned int extruder_id : extruders) { for (unsigned int extruder_id : extruders) {
double dmr = m_config.nozzle_diameter.get_at(extruder_id); double dmr = m_config.nozzle_diameter.get_at(extruder_id);