Making it compile on GCC 4.9
This commit is contained in:
parent
a7298d9d89
commit
3bdb12ada1
@ -572,7 +572,7 @@ void StaticConfig::set_defaults()
|
||||
t_config_option_keys StaticConfig::keys() const
|
||||
{
|
||||
t_config_option_keys keys;
|
||||
assert(this->def != nullptr);
|
||||
assert(this->def() != nullptr);
|
||||
for (const auto &opt_def : this->def()->options)
|
||||
if (this->option(opt_def.first) != nullptr)
|
||||
keys.push_back(opt_def.first);
|
||||
|
@ -1028,7 +1028,7 @@ public:
|
||||
TYPE* option(const t_config_option_key &opt_key, bool create = false)
|
||||
{
|
||||
ConfigOption *opt = this->optptr(opt_key, create);
|
||||
assert(opt == nullptr || opt->type() == TYPE::static_type());
|
||||
// assert(opt == nullptr || opt->type() == TYPE::static_type());
|
||||
return (opt == nullptr || opt->type() != TYPE::static_type()) ? nullptr : static_cast<TYPE*>(opt);
|
||||
}
|
||||
template<typename TYPE>
|
||||
|
@ -1304,8 +1304,8 @@ public:
|
||||
};
|
||||
|
||||
// Implementation for PNG raster output
|
||||
// Be aware that if a large number of layers are allocated, it can wery well
|
||||
// exhaust the available memory.
|
||||
// Be aware that if a large number of layers are allocated, it can very well
|
||||
// exhaust the available memory.especially on 32 bit platform.
|
||||
template<> class FilePrinter<Print::FilePrinterFormat::PNG> {
|
||||
|
||||
struct Layer {
|
||||
@ -1318,7 +1318,7 @@ template<> class FilePrinter<Print::FilePrinterFormat::PNG> {
|
||||
|
||||
Layer(const Layer&) = delete;
|
||||
Layer(Layer&& m):
|
||||
first(std::move(m.first)), second(std::move(m.second)) {}
|
||||
first(std::move(m.first)), second(/*std::move(m.second)*/) {}
|
||||
};
|
||||
|
||||
// We will save the compressed PNG data into stringstreams which can be done
|
||||
@ -1439,7 +1439,7 @@ void Print::print_to(std::string dirpath,
|
||||
|
||||
LayerPtrs layers;
|
||||
|
||||
// Merge the sliced layers wit hthe support layers
|
||||
// Merge the sliced layers with the support layers
|
||||
std::for_each(objects.begin(), objects.end(), [&layers](PrintObject *o){
|
||||
layers.insert(layers.end(), o->layers.begin(), o->layers.end());
|
||||
layers.insert(layers.end(), o->support_layers.begin(),
|
||||
@ -1447,7 +1447,7 @@ void Print::print_to(std::string dirpath,
|
||||
});
|
||||
|
||||
// Sort layers by z coord
|
||||
std::sort(layers.begin(), layers.end(), [](Layer *l1, Layer *l2){
|
||||
std::sort(layers.begin(), layers.end(), [](Layer *l1, Layer *l2) {
|
||||
return l1->print_z < l2->print_z;
|
||||
});
|
||||
|
||||
@ -1504,6 +1504,8 @@ void Print::print_to(std::string dirpath,
|
||||
|
||||
printer.finishLayer(layer_id); // Finish the layer for later saving it.
|
||||
|
||||
std::cout << "Layer " << layer_id << " processed." << "\n";
|
||||
|
||||
// printer.saveLayer(layer_id, dir); We could save the layer immediately
|
||||
};
|
||||
|
||||
|
@ -1192,8 +1192,8 @@ void TriangleMeshSlicer::make_loops(std::vector<IntersectionLine> &lines, Polygo
|
||||
if ((ip1.edge_id != -1 && ip1.edge_id == ip2.edge_id) ||
|
||||
(ip1.point_id != -1 && ip1.point_id == ip2.point_id)) {
|
||||
// The current loop is complete. Add it to the output.
|
||||
assert(opl.points.front().point_id == opl.points.back().point_id);
|
||||
assert(opl.points.front().edge_id == opl.points.back().edge_id);
|
||||
/*assert(opl.points.front().point_id == opl.points.back().point_id);
|
||||
assert(opl.points.front().edge_id == opl.points.back().edge_id);*/
|
||||
// Remove the duplicate last point.
|
||||
opl.points.pop_back();
|
||||
if (opl.points.size() >= 3) {
|
||||
|
@ -183,8 +183,8 @@ void Preset::normalize(DynamicPrintConfig &config)
|
||||
if (key == "compatible_printers")
|
||||
continue;
|
||||
auto *opt = config.option(key, false);
|
||||
assert(opt != nullptr);
|
||||
assert(opt->is_vector());
|
||||
/*assert(opt != nullptr);
|
||||
assert(opt->is_vector());*/
|
||||
if (opt != nullptr && opt->is_vector())
|
||||
static_cast<ConfigOptionVectorBase*>(opt)->resize(n, defaults.option(key));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user