diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-01-12 13:42:50 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-01-12 13:42:50 +0300 |
commit | 9e0dd2a96a12bb187767a702145c776ab5ea9d19 (patch) | |
tree | 036185ec9022ac6a8fe6b125b943d34f9e7213db | |
parent | cc1aaceea6ade49413df01d3dee42ff8c56b2441 (diff) |
fix-attempt to build on linux and osx
-rw-r--r-- | xs/src/libslic3r/GCode/Analyzer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xs/src/libslic3r/GCode/Analyzer.cpp b/xs/src/libslic3r/GCode/Analyzer.cpp index 07f047923..5372ff302 100644 --- a/xs/src/libslic3r/GCode/Analyzer.cpp +++ b/xs/src/libslic3r/GCode/Analyzer.cpp @@ -498,7 +498,7 @@ const GCodeAnalyzer::PreviewData::Color& GCodeAnalyzer::PreviewData::Range::get_ const GCodeAnalyzer::PreviewData::Color& GCodeAnalyzer::PreviewData::Range::get_color_at(float value) const { - return empty() ? get_color_at_max() : colors[clamp((unsigned int)0, Colors_Count - 1, unsigned int((value - min) / _step()))]; + return empty() ? get_color_at_max() : colors[clamp((unsigned int)0, Colors_Count - 1, (unsigned int)((value - min) / _step()))]; } float GCodeAnalyzer::PreviewData::Range::_step() const @@ -910,7 +910,7 @@ void GCodeAnalyzer::_processT(const GCodeReader::GCodeLine& line) { int id = (int)::strtol(cmd.substr(1).c_str(), nullptr, 10); // todo - add id validity check ? - if (_get_extruder_id() != id) + if (_get_extruder_id() != (unsigned int)id) { _set_extruder_id(id); |