From 245b4db298ae4f6d91e21a1af2c6799d481e62aa Mon Sep 17 00:00:00 2001 From: Ondrej Tuma Date: Tue, 5 Nov 2024 14:55:36 +0100 Subject: [PATCH] Fix bool default value --- stl2dat.cxx | 3 ++- stl2dat.h | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/stl2dat.cxx b/stl2dat.cxx index 4bb2d96..da925c4 100644 --- a/stl2dat.cxx +++ b/stl2dat.cxx @@ -1,3 +1,4 @@ +// 05/11/2024 1.41 Fix bool default value // 31/10/2024 1.40 Add option -swapyz (same orientation as in stl) // 31/10/2024 Fix bug in stl_edge::dump // 25/02/2023 1.32 Fix bug in -scalemm. @@ -51,7 +52,7 @@ using namespace std; -#define version "1.40" +#define version "1.41" static double ag_lim; static double ag_lim_q; diff --git a/stl2dat.h b/stl2dat.h index 2fd91e8..ed7ad4e 100644 --- a/stl2dat.h +++ b/stl2dat.h @@ -37,7 +37,7 @@ class stl_prim stl_lin transfo; std::string name; int color; - bool cw; // for bfc + bool cw = false; // for bfc stl_prim() {}; stl_prim(int col) @@ -77,7 +77,7 @@ class stl_surf public: int count; stl_prim * prim; - bool adj_cyl; + bool adj_cyl = false; stl_surf(); virtual surf_type type() { return(t_surf); }; @@ -98,7 +98,7 @@ class stl_cylinder : public stl_surf double radius; double height; stl_v normal; - bool cw; // for bfc + bool cw = false; // for bfc stl_cylinder( const stl_v & od, const stl_v & vd, double radius, double height); virtual surf_type type() { return(t_cylinder); }; @@ -183,7 +183,7 @@ class stl_curv public: int count; stl_prim * prim; - bool adj_cyl; + bool adj_cyl = false; stl_curv(); @@ -214,7 +214,7 @@ class stl_facet stl_facet * adjacent[4]; // the facet adjacent on edge[n] stl_vertex * vertex[4]; // the vertices stl_surf * surf; // primitive surface - bool printed; + bool printed = false; double m_surface; int precision; @@ -264,8 +264,8 @@ class stl_edge int linetype; // ldraw line type 2 or 5 int coords[2]; // number of vertex in facet adjacent[i] stl_vertex * vertex[2]; // the vertices - bool printed; - bool deleted; + bool printed = false; + bool deleted = false; int color; int nbr_edge; @@ -296,8 +296,8 @@ class stl_vertex public: stl_v coords; stl_edge_list * edge_list; - bool deleted; - bool to_remove; + bool deleted = false; + bool to_remove = false; int precision; stl_edge * edge_to_remove; @@ -344,7 +344,7 @@ class stl_file stl_prim_list * last_prim; stl_surf_list * surf_list; stl_curv_list * curv_list; - bool stl_bin; + bool stl_bin = false; public: stl_file(const char * filename);