Fix: Initializer list, right initialisation order

This commit is contained in:
ntfshard 2015-07-29 00:29:25 +03:00 committed by Alessandro Ranellucci
parent eb7464ace6
commit dd5c5eb931
8 changed files with 25 additions and 25 deletions

View File

@ -30,7 +30,7 @@ class BridgeDirectionComparator {
BridgeDetector::BridgeDetector(const ExPolygon &_expolygon, const ExPolygonCollection &_lower_slices,
coord_t _extrusion_width)
: expolygon(_expolygon), lower_slices(_lower_slices), extrusion_width(_extrusion_width),
angle(-1), resolution(PI/36.0)
resolution(PI/36.0), angle(-1)
{
/* outset our bridge by an arbitrary amout; we'll use this outer margin
for detecting anchors */

View File

@ -6,7 +6,7 @@
namespace Slic3r {
ExtrusionEntityCollection::ExtrusionEntityCollection(const ExtrusionEntityCollection& collection)
: no_sort(collection.no_sort), orig_indices(collection.orig_indices)
: orig_indices(collection.orig_indices), no_sort(collection.no_sort)
{
this->append(collection.entities);
}

View File

@ -209,9 +209,9 @@ REGISTER_CLASS(Wipe, "GCode::Wipe");
#define EXTRUDER_CONFIG(OPT) this->config.OPT.get_at(this->writer.extruder()->id)
GCode::GCode()
: enable_loop_clipping(true), enable_cooling_markers(false), layer_count(0),
layer_index(-1), first_layer(false), elapsed_time(0), volumetric_speed(0),
_last_pos_defined(false), layer(NULL), placeholder_parser(NULL)
: placeholder_parser(NULL), enable_loop_clipping(true), enable_cooling_markers(false), layer_count(0),
layer_index(-1), layer(NULL), first_layer(false), elapsed_time(0), volumetric_speed(0),
_last_pos_defined(false)
{
}

View File

@ -8,16 +8,16 @@ namespace Slic3r {
Layer::Layer(size_t id, PrintObject *object, coordf_t height, coordf_t print_z,
coordf_t slice_z)
: _id(id),
_object(object),
upper_layer(NULL),
: upper_layer(NULL),
lower_layer(NULL),
regions(),
slicing_errors(false),
slice_z(slice_z),
print_z(print_z),
height(height),
slices()
slices(),
_id(id),
_object(object)
{
}

View File

@ -248,7 +248,7 @@ REGISTER_CLASS(Model, "Model");
ModelMaterial::ModelMaterial(Model *model) : model(model) {}
ModelMaterial::ModelMaterial(Model *model, const ModelMaterial &other)
: model(model), config(other.config), attributes(other.attributes)
: attributes(other.attributes), config(other.config), model(model)
{}
void
@ -268,8 +268,7 @@ ModelObject::ModelObject(Model *model)
{}
ModelObject::ModelObject(Model *model, const ModelObject &other, bool copy_volumes)
: model(model),
name(other.name),
: name(other.name),
input_file(other.input_file),
instances(),
volumes(),
@ -277,7 +276,8 @@ ModelObject::ModelObject(Model *model, const ModelObject &other, bool copy_volum
layer_height_ranges(other.layer_height_ranges),
origin_translation(other.origin_translation),
_bounding_box(other._bounding_box),
_bounding_box_valid(other._bounding_box_valid)
_bounding_box_valid(other._bounding_box_valid),
model(model)
{
if (copy_volumes) {
this->volumes.reserve(other.volumes.size());
@ -647,12 +647,12 @@ REGISTER_CLASS(ModelObject, "Model::Object");
ModelVolume::ModelVolume(ModelObject* object, const TriangleMesh &mesh)
: object(object), mesh(mesh), modifier(false)
: mesh(mesh), modifier(false), object(object)
{}
ModelVolume::ModelVolume(ModelObject* object, const ModelVolume &other)
: object(object), name(other.name), mesh(other.mesh), config(other.config),
modifier(other.modifier)
: name(other.name), mesh(other.mesh), config(other.config),
modifier(other.modifier), object(object)
{
this->material_id(other.material_id());
}
@ -701,11 +701,11 @@ REGISTER_CLASS(ModelVolume, "Model::Volume");
ModelInstance::ModelInstance(ModelObject *object)
: object(object), rotation(0), scaling_factor(1)
: rotation(0), scaling_factor(1), object(object)
{}
ModelInstance::ModelInstance(ModelObject *object, const ModelInstance &other)
: object(object), rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset)
: rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object)
{}
void

View File

@ -22,7 +22,7 @@ class PerimeterGeneratorLoop {
std::vector<PerimeterGeneratorLoop> children;
PerimeterGeneratorLoop(Polygon polygon, unsigned short depth)
: polygon(polygon), depth(depth), is_contour(false)
: polygon(polygon), is_contour(false), depth(depth)
{};
bool is_external() const;
bool is_internal_contour() const;
@ -50,8 +50,8 @@ class PerimeterGenerator {
PrintConfig* print_config, ExtrusionEntityCollection* loops,
ExtrusionEntityCollection* gap_fill, SurfaceCollection* fill_surfaces)
: slices(slices), lower_slices(NULL), layer_height(layer_height),
perimeter_flow(flow), ext_perimeter_flow(flow), overhang_flow(flow),
solid_infill_flow(flow), layer_id(-1),
layer_id(-1), perimeter_flow(flow), ext_perimeter_flow(flow),
overhang_flow(flow), solid_infill_flow(flow),
config(config), object_config(object_config), print_config(print_config),
loops(loops), gap_fill(gap_fill), fill_surfaces(fill_surfaces),
_ext_mm3_per_mm(-1), _mm3_per_mm(-1), _mm3_per_mm_overhang(-1)

View File

@ -6,9 +6,9 @@
namespace Slic3r {
PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox)
: _print(print),
_model_object(model_object),
typed_slices(false)
: typed_slices(false),
_print(print),
_model_object(model_object)
{
// Compute the translation to be applied to our meshes so that we work with smaller coordinates
{

View File

@ -6,7 +6,7 @@
namespace Slic3r {
SVG::SVG(const char* filename)
: arrows(true), filename(filename), fill("grey"), stroke("black")
: arrows(true), fill("grey"), stroke("black"), filename(filename)
{
this->f = fopen(filename, "w");
fprintf(this->f,