mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-05 00:31:03 -07:00
Fix build warnings on windows, fix various bugs/logic errors/missing returns/etc, update boost::bind (#2229)
Fix build warnings on windows, fix various bugs/logic errors/missing returns/etc, update boost::bind.
This commit is contained in:
parent
cba9e79e06
commit
3433e7bfa0
12 changed files with 33 additions and 23 deletions
|
|
@ -1660,7 +1660,7 @@ public:
|
|||
ConfigOptionEnumsGenericTempl& operator= (const ConfigOption* opt) { this->set(opt); return *this; }
|
||||
bool operator< (const ConfigOptionInts& rhs) const throw() { return this->values < rhs.values; }
|
||||
|
||||
bool operator==(const ConfigOptionInts& rhs) const throw()
|
||||
bool operator==(const ConfigOptionInts& rhs) const
|
||||
{
|
||||
if (rhs.type() != this->type())
|
||||
throw ConfigurationError("ConfigOptionEnumsGeneric: Comparing incompatible types");
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ void gcode_add_line_number(const std::string& path, const DynamicPrintConfig& co
|
|||
while (std::getline(fs, gcode_line)) {
|
||||
char num_str[128];
|
||||
memset(num_str, 0, sizeof(num_str));
|
||||
snprintf(num_str, sizeof(num_str), "%d", line_number);
|
||||
snprintf(num_str, sizeof(num_str), "%zd", line_number);
|
||||
new_gcode += std::string("N") + num_str + " " + gcode_line + "\n";
|
||||
line_number++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef MESHSPLITIMPL_HPP
|
||||
#define MESHSPLITIMPL_HPP
|
||||
|
||||
// Disable meaningless boost warning on MSVC
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4805 )
|
||||
#endif
|
||||
|
||||
#include "TriangleMesh.hpp"
|
||||
#include "libnest2d/tools/benchmark.h"
|
||||
#include "Execution/ExecutionTBB.hpp"
|
||||
|
|
@ -268,4 +274,8 @@ std::vector<Vec3i> create_face_neighbors_index(ExPolicy &&ex, const indexed_tria
|
|||
|
||||
} // namespace Slic3r
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif // MESHSPLITIMPL_HPP
|
||||
|
|
|
|||
|
|
@ -3187,7 +3187,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
|||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(":error parsing thin_fills found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing thin_fills at layer %d, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing thin_fills at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
|
|
@ -3242,7 +3242,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
|||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing perimeters found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing perimeters at layer %d, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing perimeters at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
|
|
@ -3257,7 +3257,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
|||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing fills found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing fills at layer %d, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing fills at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
|
|
@ -3325,7 +3325,7 @@ void extract_support_layer(const json& support_layer_json, SupportLayer& support
|
|||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing fills found at support_layer %1%, print_z %2%")%support_layer.id() %support_layer.print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing fills at support_layer %d, print_z %f", support_layer.id(), support_layer.print_z);
|
||||
::sprintf(error_buf, "Error while parsing fills at support_layer %zd, print_z %f", support_layer.id(), support_layer.print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue