C++ code cleanup

This commit is contained in:
Enrico Turri 2018-06-12 12:18:16 +02:00
parent f8664fce71
commit 0faaef76e8
11 changed files with 2 additions and 1160 deletions

View file

@ -222,7 +222,6 @@ BoundingBox3Base<PointClass>::center() const
}
template Pointf3 BoundingBox3Base<Pointf3>::center() const;
//######################################################################################################################################33
template <class PointClass> coordf_t
BoundingBox3Base<PointClass>::max_size() const
{
@ -230,7 +229,6 @@ BoundingBox3Base<PointClass>::max_size() const
return std::max(s.x, std::max(s.y, s.z));
}
template coordf_t BoundingBox3Base<Pointf3>::max_size() const;
//######################################################################################################################################33
// Align a coordinate to a grid. The coordinate may be negative,
// the aligned value will never be bigger than the original one.

View file

@ -94,9 +94,7 @@ public:
void translate(const Pointf3 &pos) { this->translate(pos.x, pos.y, pos.z); }
void offset(coordf_t delta);
PointClass center() const;
//######################################################################################################################################33
coordf_t max_size() const;
//######################################################################################################################################33
bool contains(const PointClass &point) const {
return BoundingBoxBase<PointClass>::contains(point) && point.z >= this->min.z && point.z <= this->max.z;

View file

@ -184,9 +184,7 @@ public:
void reset_layer_height_profile();
//############################################################################################################################################
void adjust_layer_height_profile(coordf_t z, coordf_t layer_thickness_delta, coordf_t band_width, int action);
//############################################################################################################################################
// Collect the slicing parameters, to be used by variable layer thickness algorithm,
// by the interactive layer height editor and by the printing process itself.

View file

@ -4,9 +4,7 @@
#include "Geometry.hpp"
#include "SupportMaterial.hpp"
#include "Surface.hpp"
//############################################################################################################################################
#include "Slicing.hpp"
//############################################################################################################################################
#include <utility>
#include <boost/log/trivial.hpp>
@ -1964,7 +1962,6 @@ void PrintObject::reset_layer_height_profile()
this->model_object()->layer_height_profile_valid = false;
}
//############################################################################################################################################
void PrintObject::adjust_layer_height_profile(coordf_t z, coordf_t layer_thickness_delta, coordf_t band_width, int action)
{
update_layer_height_profile(_model_object->layer_height_profile);
@ -1972,6 +1969,5 @@ void PrintObject::adjust_layer_height_profile(coordf_t z, coordf_t layer_thickne
_model_object->layer_height_profile_valid = true;
layer_height_profile_valid = false;
}
//############################################################################################################################################
} // namespace Slic3r

View file

@ -91,18 +91,12 @@ public:
~PerlCallback() { this->deregister_callback(); }
void register_callback(void *sv);
void deregister_callback();
//##############################################################################################################
void call() const;
void call(int i) const;
void call(int i, int j) const;
void call(const std::vector<int>& ints) const;
void call(double x, double y) const;
void call(bool b) const;
// void call();
// void call(int i);
// void call(int i, int j);
//// void call(const std::vector<int> &ints);
//##############################################################################################################
private:
void *m_callback;
};

View file

@ -184,10 +184,7 @@ void PerlCallback::deregister_callback()
}
}
//##############################################################################################################
void PerlCallback::call() const
//void PerlCallback::call()
//##############################################################################################################
{
if (! m_callback)
return;
@ -201,10 +198,7 @@ void PerlCallback::call() const
LEAVE;
}
//##############################################################################################################
void PerlCallback::call(int i) const
//void PerlCallback::call(int i)
//##############################################################################################################
{
if (! m_callback)
return;
@ -219,10 +213,7 @@ void PerlCallback::call(int i) const
LEAVE;
}
//##############################################################################################################
void PerlCallback::call(int i, int j) const
//void PerlCallback::call(int i, int j)
//##############################################################################################################
{
if (! m_callback)
return;
@ -238,10 +229,7 @@ void PerlCallback::call(int i, int j) const
LEAVE;
}
//##############################################################################################################
void PerlCallback::call(const std::vector<int>& ints) const
//void PerlCallback::call(const std::vector<int> &ints)
//##############################################################################################################
{
if (! m_callback)
return;
@ -249,24 +237,16 @@ void PerlCallback::call(const std::vector<int>& ints) const
ENTER;
SAVETMPS;
PUSHMARK(SP);
//##############################################################################################################
for (int i : ints)
{
XPUSHs(sv_2mortal(newSViv(i)));
}
// AV* av = newAV();
// for (int i : ints)
// av_push(av, newSViv(i));
// XPUSHs(av);
//##############################################################################################################
PUTBACK;
perl_call_sv(SvRV((SV*)m_callback), G_DISCARD);
FREETMPS;
LEAVE;
}
//##############################################################################################################
void PerlCallback::call(double x, double y) const
{
if (!m_callback)
@ -287,7 +267,6 @@ void PerlCallback::call(bool b) const
{
call(b ? 1 : 0);
}
//##############################################################################################################
#ifdef WIN32
#ifndef NOMINMAX