From 834decb5795c9f232ae2286078793ab07f6486bf Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 31 May 2015 01:15:44 +0300 Subject: [PATCH 1/8] ENH: Parameters passed as a const reference --- k3dsdk/measurement.cpp | 20 ++++++++++---------- k3dsdk/measurement.h | 20 ++++++++++---------- modules/cloth/d_Vec3f.h | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/k3dsdk/measurement.cpp b/k3dsdk/measurement.cpp index 026a626c..c88ede3f 100644 --- a/k3dsdk/measurement.cpp +++ b/k3dsdk/measurement.cpp @@ -44,7 +44,7 @@ bool parse(std::istream& Stream, double&Value, std::string& Units) return parse(buffer, Value, Units); } -bool parse(const std::string Buffer, double& Value, std::string& Units) +bool parse(const std::string& Buffer, double& Value, std::string& Units) { std::stack stack; std::string units; @@ -59,7 +59,7 @@ bool parse(const std::string Buffer, double& Value, std::string& Units) return true; } -bool parse(const std::string Buffer, double&Value, const std::type_info* const Units) +bool parse(const std::string& Buffer, double&Value, const std::type_info* const Units) { // Parse the input expression into value and unit-of-measure (it can do mathematical expressions, too, for fun) double value; @@ -326,7 +326,7 @@ const volume_units_t& volume_units() return units; } -const angle& angle_units(const std::string Symbol) +const angle& angle_units(const std::string& Symbol) { angle_units_t::const_iterator unit = angle_units().find(Symbol); @@ -336,7 +336,7 @@ const angle& angle_units(const std::string Symbol) return unit->second; } -const area& area_units(const std::string Symbol) +const area& area_units(const std::string& Symbol) { area_units_t::const_iterator unit = area_units().find(Symbol); @@ -346,7 +346,7 @@ const area& area_units(const std::string Symbol) return unit->second; } -const distance& distance_units(const std::string Symbol) +const distance& distance_units(const std::string& Symbol) { distance_units_t::const_iterator unit = distance_units().find(Symbol); @@ -356,7 +356,7 @@ const distance& distance_units(const std::string Symbol) return unit->second; } -const force& force_units(const std::string Symbol) +const force& force_units(const std::string& Symbol) { force_units_t::const_iterator unit = force_units().find(Symbol); @@ -366,7 +366,7 @@ const force& force_units(const std::string Symbol) return unit->second; } -const mass& mass_units(const std::string Symbol) +const mass& mass_units(const std::string& Symbol) { mass_units_t::const_iterator unit = mass_units().find(Symbol); @@ -376,7 +376,7 @@ const mass& mass_units(const std::string Symbol) return unit->second; } -const pressure& pressure_units(const std::string Symbol) +const pressure& pressure_units(const std::string& Symbol) { pressure_units_t::const_iterator unit = pressure_units().find(Symbol); @@ -386,7 +386,7 @@ const pressure& pressure_units(const std::string Symbol) return unit->second; } -const time& time_units(const std::string Symbol) +const time& time_units(const std::string& Symbol) { time_units_t::const_iterator unit = time_units().find(Symbol); @@ -396,7 +396,7 @@ const time& time_units(const std::string Symbol) return unit->second; } -const volume& volume_units(const std::string Symbol) +const volume& volume_units(const std::string& Symbol) { volume_units_t::const_iterator unit = volume_units().find(Symbol); diff --git a/k3dsdk/measurement.h b/k3dsdk/measurement.h index e44bae24..9edf7aef 100644 --- a/k3dsdk/measurement.h +++ b/k3dsdk/measurement.h @@ -322,7 +322,7 @@ bool parse(std::istream& Stream, double&Value, std::string& Units); \return true, iff the input expression is completely parsed, false otherwise */ -bool parse(const std::string Buffer, double&Value, std::string& Units); +bool parse(const std::string& Buffer, double&Value, std::string& Units); /** @@ -333,7 +333,7 @@ bool parse(const std::string Buffer, double&Value, std::string& Units); \return true, iff the input expression is completely parsed, false otherwise */ -bool parse(const std::string Buffer, double&Value, const std::type_info* const Units); +bool parse(const std::string& Buffer, double&Value, const std::type_info* const Units); /// Defines a collection of units of angular measure, keyed by string (typically name or symbol) typedef std::map angle_units_t; @@ -370,21 +370,21 @@ const time_units_t& time_units(); const volume_units_t& volume_units(); /// Returns a reference to a common unit of angular measure keyed by symbol. Throws std::exception if the symbol is unknown. -const angle& angle_units(const std::string Symbol); +const angle& angle_units(const std::string& Symbol); /// Returns a reference to a common unit of area keyed by symbol. Throws std::exception if the symbol is unknown. -const area& area_units(const std::string Symbol); +const area& area_units(const std::string& Symbol); /// Returns a reference to a common unit of distance keyed by symbol. Throws std::exception if the symbol is unknown. -const distance& distance_units(const std::string Symbol); +const distance& distance_units(const std::string& Symbol); /// Returns a reference to a common unit of force keyed by symbol. Throws std::exception if the symbol is unknown. -const force& force_units(const std::string Symbol); +const force& force_units(const std::string& Symbol); /// Returns a reference to a common unit of mass keyed by symbol. Throws std::exception if the symbol is unknown. -const mass& mass_units(const std::string Symbol); +const mass& mass_units(const std::string& Symbol); /// Returns a reference to a common unit of pressure keyed by symbol. Throws std::exception if the symbol is unknown. -const pressure& pressure_units(const std::string Symbol); +const pressure& pressure_units(const std::string& Symbol); /// Returns a reference to a common unit of time keyed by symbol. Throws std::exception if the symbol is unknown. -const time& time_units(const std::string Symbol); +const time& time_units(const std::string& Symbol); /// Returns a reference to a common unit of volume keyed by symbol. Throws std::exception if the symbol is unknown. -const volume& volume_units(const std::string Symbol); +const volume& volume_units(const std::string& Symbol); } // namespace measurement diff --git a/modules/cloth/d_Vec3f.h b/modules/cloth/d_Vec3f.h index 86eb61bf..a29e5050 100644 --- a/modules/cloth/d_Vec3f.h +++ b/modules/cloth/d_Vec3f.h @@ -45,13 +45,13 @@ namespace d_Math return p[i]; } - d_Vec3f operator + (const d_Vec3f v) const + d_Vec3f operator + (const d_Vec3f& v) const { d_Vec3f res(p[0]+v[0], p[1]+v[1], p[2]+v[2]); return res; } - d_Vec3f operator - (const d_Vec3f v) const + d_Vec3f operator - (const d_Vec3f& v) const { d_Vec3f res(p[0]-v[0], p[1]-v[1], p[2]-v[2]); return res; @@ -71,7 +71,7 @@ namespace d_Math }; - float len(const d_Vec3f a) + float len(const d_Vec3f& a) { return sqrt(a[0]*a[0] + a[1]*a[1] + a[2]*a[2]); } From cc826701c382b8c6e1f8d2f68728dc93bfb7e7d4 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 31 May 2015 02:10:02 +0300 Subject: [PATCH 2/8] ENH: Prefix increment operator for iterators --- k3dsdk/nodes.cpp | 2 +- k3dsdk/sl.cpp | 2 +- modules/inotify/inotify-cxx.cpp | 2 +- .../ContentPanel.h | 2 +- .../GroupContentPanel.cpp | 54 +++++++++---------- .../MaterialGroup.cpp | 2 +- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/k3dsdk/nodes.cpp b/k3dsdk/nodes.cpp index a3aa0cb2..6e0b1c00 100644 --- a/k3dsdk/nodes.cpp +++ b/k3dsdk/nodes.cpp @@ -119,7 +119,7 @@ inode* find_node(inode_collection& Nodes, iproperty& Property) const std::string unique_name(inode_collection& Nodes, const std::string& Name) { // For each node in the collection ... - for(k3d::inode_collection::nodes_t::const_iterator handle = Nodes.collection().begin(); handle != Nodes.collection().end(); handle++) + for(k3d::inode_collection::nodes_t::const_iterator handle = Nodes.collection().begin(); handle != Nodes.collection().end(); ++handle) { inode* const node = *handle; diff --git a/k3dsdk/sl.cpp b/k3dsdk/sl.cpp index 737aafc9..504c61fd 100644 --- a/k3dsdk/sl.cpp +++ b/k3dsdk/sl.cpp @@ -96,7 +96,7 @@ void parse_stream(std::istream& Stream, token_collection_t& Output) token_t token; - for(token_t::iterator c = buffer.begin(); c != buffer.end(); c++) + for(token_t::iterator c = buffer.begin(); c != buffer.end(); ++c) { if(stringliteral) { diff --git a/modules/inotify/inotify-cxx.cpp b/modules/inotify/inotify-cxx.cpp index a011567f..f79783c1 100644 --- a/modules/inotify/inotify-cxx.cpp +++ b/modules/inotify/inotify-cxx.cpp @@ -416,7 +416,7 @@ void Inotify::RemoveAll() pW->m_wd = -1; } pW->m_pInotify = NULL; - it++; + ++it; } m_watches.clear(); diff --git a/modules/ngui_material_manager_panel/ContentPanel.h b/modules/ngui_material_manager_panel/ContentPanel.h index ca08a6e4..85af4168 100644 --- a/modules/ngui_material_manager_panel/ContentPanel.h +++ b/modules/ngui_material_manager_panel/ContentPanel.h @@ -101,7 +101,7 @@ class ContentPanel std::list::iterator geo_iter = m_used_geometry.begin(); - for(; geo_iter != m_used_geometry.end(); geo_iter++) + for(; geo_iter != m_used_geometry.end(); ++geo_iter) delete (*geo_iter); } diff --git a/modules/ngui_material_manager_panel/GroupContentPanel.cpp b/modules/ngui_material_manager_panel/GroupContentPanel.cpp index bdf73338..ee934950 100644 --- a/modules/ngui_material_manager_panel/GroupContentPanel.cpp +++ b/modules/ngui_material_manager_panel/GroupContentPanel.cpp @@ -17,93 +17,93 @@ GroupContentPanel::~GroupContentPanel() //ALL Gtk Hboxes***************** std::vector::iterator hbox_iter = m_pview_data_conts.begin(); - for(; hbox_iter != m_pview_data_conts.end(); hbox_iter++) + for(; hbox_iter != m_pview_data_conts.end(); ++hbox_iter) delete (*hbox_iter); hbox_iter = m_label_data_conts.begin(); - for(; hbox_iter != m_label_data_conts.end(); hbox_iter++) + for(; hbox_iter != m_label_data_conts.end(); ++hbox_iter) delete (*hbox_iter); //ALL Gtk Vboxes***************** std::vector::iterator vbox_iter = m_data_desc_conts.begin(); - for(; vbox_iter != m_data_desc_conts.end(); vbox_iter++) + for(; vbox_iter != m_data_desc_conts.end(); ++vbox_iter) delete (*vbox_iter); vbox_iter = m_label_conts.begin(); - for(; vbox_iter != m_label_conts.end(); vbox_iter++) + for(; vbox_iter != m_label_conts.end(); ++vbox_iter) delete (*vbox_iter); vbox_iter = m_data_conts.begin(); - for(; vbox_iter != m_data_conts.end(); vbox_iter++) + for(; vbox_iter != m_data_conts.end(); ++vbox_iter) delete (*vbox_iter); //ALL Gtk Frames***************** std::vector::iterator frame_iter = m_pview_frames.begin(); - for(; frame_iter != m_pview_frames.end(); frame_iter++) + for(; frame_iter != m_pview_frames.end(); ++frame_iter) delete (*frame_iter); //ALL Gtk Labels***************** std::vector::iterator label_iter = m_name_labels.begin(); - for(; label_iter != m_name_labels.end(); label_iter++) + for(; label_iter != m_name_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_type_labels.begin(); - for(; label_iter != m_type_labels.end(); label_iter++) + for(; label_iter != m_type_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_datemod_labels.begin(); - for(; label_iter != m_datemod_labels.end(); label_iter++) + for(; label_iter != m_datemod_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_artistname_labels.begin(); - for(; label_iter != m_artistname_labels.end(); label_iter++) + for(; label_iter != m_artistname_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_name_data_labels.begin(); - for(; label_iter != m_name_data_labels.end(); label_iter++) + for(; label_iter != m_name_data_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_type_data_labels.begin(); - for(; label_iter != m_type_data_labels.end(); label_iter++) + for(; label_iter != m_type_data_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_datemod_data_labels.begin(); - for(; label_iter != m_datemod_data_labels.end(); label_iter++) + for(; label_iter != m_datemod_data_labels.end(); ++label_iter) delete (*label_iter); label_iter = m_artistname_data_labels.begin(); - for(; label_iter != m_artistname_data_labels.end(); label_iter++) + for(; label_iter != m_artistname_data_labels.end(); ++label_iter) delete (*label_iter); //ALL Gtk Textviews*************** std::vector::iterator mltxt_iter = m_artistnotes_mltext.begin(); - for(; mltxt_iter != m_artistnotes_mltext.end(); mltxt_iter++) + for(; mltxt_iter != m_artistnotes_mltext.end(); ++mltxt_iter) delete (*mltxt_iter); //ALL Gtk ScrolledWindows********* std::vector::iterator scroll_iter = m_artistnotes_scrollwin.begin(); - for(; scroll_iter != m_artistnotes_scrollwin.end(); scroll_iter++) + for(; scroll_iter != m_artistnotes_scrollwin.end(); ++scroll_iter) delete (*scroll_iter); //ALL Gtk HSeparator************** std::vector::iterator hsep_iter = m_data_notes_seps.begin(); - for(; hsep_iter != m_data_notes_seps.end(); hsep_iter++) + for(; hsep_iter != m_data_notes_seps.end(); ++hsep_iter) delete (*hsep_iter); hsep_iter = m_materials_seps.begin(); - for(; hsep_iter != m_materials_seps.end(); hsep_iter++) + for(; hsep_iter != m_materials_seps.end(); ++hsep_iter) delete (*hsep_iter); //ALL Gtk VSeparator************** std::vector::iterator vsep_iter = m_label_data_seps.begin(); - for(; vsep_iter != m_label_data_seps.end(); vsep_iter++) + for(; vsep_iter != m_label_data_seps.end(); ++vsep_iter) delete (*vsep_iter); @@ -147,7 +147,7 @@ void GroupContentPanel::buildPanel() std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { //Create File Name For Material Preview Image k3d::string_t int_str; @@ -280,7 +280,7 @@ void GroupContentPanel::buildPanel() m_materials_cont.pack_start(*t_HBreaker, false, false, 0); //Increment Filename Tag For Unique Identifier - fileName_int++; + ++fileName_int; }//for @@ -318,7 +318,7 @@ void GroupContentPanel::renderPreview() std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { //Check If Selected Node Is A RenderMan Material if((*mat_iter)->isMaterial()) @@ -371,7 +371,7 @@ bool GroupContentPanel::updatePreviewImage() //Invoke A Gtk Image Update / Refresh For Each Preview Image std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { (const_cast((*mat_iter)->pviewImg()))->queue_resize(); (const_cast((*mat_iter)->pviewImg()))->queue_draw(); @@ -389,7 +389,7 @@ void GroupContentPanel::renderSinglePreview(k3d::inode *node) MaterialObj* matching_material = 0; - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { //Check If MaterialObj's Doc Node Equals Argument Node if((*mat_iter)->m_doc_node == node) @@ -450,7 +450,7 @@ bool GroupContentPanel::findMaterial(const k3d::inode *node) //Iterate Through All Of The Stored MaterialObj's. std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { if((*mat_iter)->docNode() == node) { @@ -469,7 +469,7 @@ bool GroupContentPanel::findMaterial(const MaterialObj *mat) //Iterate Through All Of The Stored MaterialObj's. std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { if(*mat_iter == mat) { @@ -488,7 +488,7 @@ void GroupContentPanel::matobjAttachGeo() //Iterate Through All Of The Stored MaterialObj's. std::list::const_iterator mat_iter = m_materialgrp->materialBegin(); - for(; mat_iter != m_materialgrp->materialEnd(); mat_iter++) + for(; mat_iter != m_materialgrp->materialEnd(); ++mat_iter) { //Get The Doc Node From MaterialObj Ptr k3d::inode *mat_node = (*mat_iter)->m_doc_node; diff --git a/modules/ngui_material_manager_panel/MaterialGroup.cpp b/modules/ngui_material_manager_panel/MaterialGroup.cpp index e9c8c4c7..1ac2d0f3 100644 --- a/modules/ngui_material_manager_panel/MaterialGroup.cpp +++ b/modules/ngui_material_manager_panel/MaterialGroup.cpp @@ -14,7 +14,7 @@ void MaterialGroup::clearGroup() std::list::iterator materialIter = m_materials.begin(); //Clean Up The List Of material Objects (MaterialObj) - for(; materialIter != m_materials.end(); materialIter++) + for(; materialIter != m_materials.end(); ++materialIter) delete (*materialIter); //Ensure Clean List Storage From 75573d7728e7347e3965c42561771eebde1a675b Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 31 May 2015 02:41:19 +0300 Subject: [PATCH 3/8] ENH: Unsigned variable cant be less 0 --- modules/lsystem/l_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lsystem/l_parser.cpp b/modules/lsystem/l_parser.cpp index ac286d9a..f9ea7c33 100644 --- a/modules/lsystem/l_parser.cpp +++ b/modules/lsystem/l_parser.cpp @@ -804,7 +804,7 @@ void L_mutate() unsigned long random = (unsigned long)(Rnd() * 12.0); - if(random < 0 || random > 11) + if(random > 11) return; if(rules[i][j] == mutations[random][0]) @@ -833,7 +833,7 @@ void L_mutate() unsigned long random = (unsigned long)(Rnd() * 6.0); - if(random < 0 || random > 5) + if(random > 5) return; if(rules[i][j] == mutations[random][0]) From de0be134ffd6acddae4fc3c537ee2e4afe9fa631 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 31 May 2015 03:06:05 +0300 Subject: [PATCH 4/8] ENH: Removed duplicate break --- k3dsdk/ngui/selection.cpp | 1 - k3dsdk/qtui/selection.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/k3dsdk/ngui/selection.cpp b/k3dsdk/ngui/selection.cpp index 9672a597..12657cef 100644 --- a/k3dsdk/ngui/selection.cpp +++ b/k3dsdk/ngui/selection.cpp @@ -753,7 +753,6 @@ class state::implementation return_if_fail(conversion); k3d::selection::set::append(conversion->create_mesh_selection(*mesh), new_selection); break; - break; } case POINT: { diff --git a/k3dsdk/qtui/selection.cpp b/k3dsdk/qtui/selection.cpp index 300b195a..eda6a8d2 100644 --- a/k3dsdk/qtui/selection.cpp +++ b/k3dsdk/qtui/selection.cpp @@ -731,7 +731,6 @@ class state::implementation return_if_fail(conversion); k3d::selection::set::append(conversion->create_mesh_selection(*mesh), new_selection); break; - break; } case POINT: { From 640577ce51d9e9db3c266e684b8a78981305fac2 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Sun, 31 May 2015 03:16:33 +0300 Subject: [PATCH 5/8] FIX: printf unsigned int requires %u --- modules/pdiff/CompareArgs.cpp | 2 +- modules/pdiff/Metric.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pdiff/CompareArgs.cpp b/modules/pdiff/CompareArgs.cpp index 136092d1..e1a4a784 100644 --- a/modules/pdiff/CompareArgs.cpp +++ b/modules/pdiff/CompareArgs.cpp @@ -62,7 +62,7 @@ CompareArgs::~CompareArgs() void CompareArgs::Print_Args() { printf("Field of view is %f degrees\n", FieldOfView); - printf("Threshold pixels is %d pixels\n", ThresholdPixels); + printf("Threshold pixels is %u pixels\n", ThresholdPixels); printf("The Gamma is %f\n", Gamma); printf("The Display's luminance is %f candela per meter squared\n", Luminance); } diff --git a/modules/pdiff/Metric.cpp b/modules/pdiff/Metric.cpp index d7801294..905597c9 100644 --- a/modules/pdiff/Metric.cpp +++ b/modules/pdiff/Metric.cpp @@ -299,7 +299,7 @@ bool Yee_Compare(CompareArgs &args) } char different[100]; - sprintf(different, "%d pixels are different\n", args.FailedPixels); + sprintf(different, "%u pixels are different\n", args.FailedPixels); args.ErrorStr = "Images are visibly different\n"; args.ErrorStr += different; From fc05169c7bbe9d21f27091cfdf4ccfe65c6a75f4 Mon Sep 17 00:00:00 2001 From: ntfshard Date: Mon, 1 Jun 2015 00:07:07 +0300 Subject: [PATCH 6/8] FIX: Result of operator '|' is always true --- modules/solar/solpos/solpos.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/solar/solpos/solpos.cpp b/modules/solar/solpos/solpos.cpp index 1fd290c2..e98dfed5 100644 --- a/modules/solar/solpos/solpos.cpp +++ b/modules/solar/solpos/solpos.cpp @@ -881,15 +881,15 @@ static void localtrig( struct posdata *pdat, struct trigdata *tdat ) if ( tdat->sd < -900.0 ) /* sd was initialized -999 as flag */ { tdat->sd = 1.0; /* reflag as having completed calculations */ - if ( pdat->function | CD_MASK ) + if ( pdat->function & CD_MASK ) tdat->cd = cos ( raddeg * pdat->declin ); - if ( pdat->function | CH_MASK ) + if ( pdat->function & CH_MASK ) tdat->ch = cos ( raddeg * pdat->hrang ); - if ( pdat->function | CL_MASK ) + if ( pdat->function & CL_MASK ) tdat->cl = cos ( raddeg * pdat->latitude ); - if ( pdat->function | SD_MASK ) + if ( pdat->function & SD_MASK ) tdat->sd = sin ( raddeg * pdat->declin ); - if ( pdat->function | SL_MASK ) + if ( pdat->function & SL_MASK ) tdat->sl = sin ( raddeg * pdat->latitude ); } } From eed75a20d668700bef3c678f4af64d3d79c084ad Mon Sep 17 00:00:00 2001 From: ntfshard Date: Mon, 1 Jun 2015 02:47:01 +0300 Subject: [PATCH 7/8] ENH: Removed unused variables --- modules/collada_io/int_elements.cpp | 4 ---- modules/polyhedron/bevel_faces.cpp | 1 - modules/polyhedron/fillet_edges.cpp | 1 - modules/svg_io/mesh_reader.cpp | 1 - 4 files changed, 7 deletions(-) diff --git a/modules/collada_io/int_elements.cpp b/modules/collada_io/int_elements.cpp index 87f63be3..9d3c39dd 100755 --- a/modules/collada_io/int_elements.cpp +++ b/modules/collada_io/int_elements.cpp @@ -101,7 +101,6 @@ namespace io } domSource *source_vertex; - domSource *source_normal; domSource *source_texcoord=NULL; daeURI *elementURI; @@ -117,7 +116,6 @@ namespace io } domFloat_array *floatArray_vertex; - domFloat_array *floatArray_normal; domFloat_array *floatArray_texcoord; if(source_vertex) @@ -236,7 +234,6 @@ namespace io } domSource *source_vertex; - domSource *source_normal; domSource *source_texcoord=NULL; daeURI *elementURI; @@ -253,7 +250,6 @@ namespace io } domFloat_array *floatArray_vertex; - domFloat_array *floatArray_normal; domFloat_array *floatArray_texcoord; if(source_vertex) diff --git a/modules/polyhedron/bevel_faces.cpp b/modules/polyhedron/bevel_faces.cpp index 0e5fa2bc..188ed412 100644 --- a/modules/polyhedron/bevel_faces.cpp +++ b/modules/polyhedron/bevel_faces.cpp @@ -180,7 +180,6 @@ bool subdivide_edges(k3d::legacy::face& Face, k3d::legacy::mesh& Mesh, bevel_edg while(subdivided_edge->companion != stop); } - std::vector new_points; edges_t bevel_edges; for(edges_t::reverse_iterator edge_i = face_edges.rbegin(); edge_i != face_edges.rend(); ++edge_i) diff --git a/modules/polyhedron/fillet_edges.cpp b/modules/polyhedron/fillet_edges.cpp index 0ac1dc3a..d909f33e 100644 --- a/modules/polyhedron/fillet_edges.cpp +++ b/modules/polyhedron/fillet_edges.cpp @@ -1199,7 +1199,6 @@ void fill_intersections(intersection_edges_t& IntersectionEdges, k3d::imaterial* Mesh.points.push_back(center_point); // Link faces to center - std::vector edges; for(unsigned long m = 0; m < border_number; ++m) { return_if_fail(borders[m].vertices.size()); diff --git a/modules/svg_io/mesh_reader.cpp b/modules/svg_io/mesh_reader.cpp index 9366b2c4..3110e28d 100644 --- a/modules/svg_io/mesh_reader.cpp +++ b/modules/svg_io/mesh_reader.cpp @@ -785,7 +785,6 @@ static void parse_graphics(const k3d::xml::element& SVG, transform_stack& Transf std::istringstream trans_stream(trans); k3d::double_t x, y; char token; - char tmp; while (!trans_stream.eof()) { trans_stream >> token; From 9701039d75c1dec0c196811b3d40772e15aa760d Mon Sep 17 00:00:00 2001 From: ntfshard Date: Mon, 1 Jun 2015 03:17:21 +0300 Subject: [PATCH 8/8] ENH: Prefix increment operator for iterators --- modules/ngui_material_manager_panel/panel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ngui_material_manager_panel/panel.cpp b/modules/ngui_material_manager_panel/panel.cpp index e901b607..97d430d0 100644 --- a/modules/ngui_material_manager_panel/panel.cpp +++ b/modules/ngui_material_manager_panel/panel.cpp @@ -244,7 +244,7 @@ void Model::buildModel(document_state& DocumentState) void Model::clearModel() { std::list::iterator groupIter = m_groups.begin(); - for(; groupIter != m_groups.end(); groupIter++) + for(; groupIter != m_groups.end(); ++groupIter) delete (*groupIter); //Ensure Clean Storage @@ -509,7 +509,7 @@ void Implementation::buildTree() Gtk::TreeRow first_group_row; bool on_first_row = true; - for(; group_iter != m_model->m_groups.end(); group_iter++) + for(; group_iter != m_model->m_groups.end(); ++group_iter) { Gtk::TreeRow row = *tree_model->append(); row[m_columns.m_col_name] = (*group_iter)->name(); @@ -528,7 +528,7 @@ void Implementation::buildTree() std::list::const_iterator matobj_iter = (*group_iter)->materialBegin(); - for(; matobj_iter != (*group_iter)->materialEnd(); matobj_iter++) + for(; matobj_iter != (*group_iter)->materialEnd(); ++matobj_iter) { //Create Row & USe MaterialObj To Fill In The Blanks Gtk::TreeModel::Row childrow = *(tree_model->append(row.children()));