Hi, another one for the 6.0 series: remove casts with the same source and destination type.
Most of these are trivial, but in some mathematical formulas that a cast was tautological could mean that some parentheses were wrong, for example int i = 5; double d = (double)(i + 1.0); is flagged by the compiler because the result of the addition is already a double -- the author could have intended either "((double)i) + 1.0" or "(double)(i + 1)", which have slightly different semantics. My patch simply removes the extra cast, keeping semantics as before, but perhaps not as intended. As with the last big patch, this is just a heads-up; these patches live in my tree and I plan to carry them forward until accepted or someone tells me off. Simon Simon Richter (1): Remove tautological casts 3d-viewer/3d_cache/dialogs/panel_prev_model.cpp | 2 +- 3d-viewer/3d_cache/sg/sg_helpers.h | 4 ++-- 3d-viewer/3d_canvas/create_layer_items.cpp | 10 ++++----- 3d-viewer/3d_model_viewer/c3d_model_viewer.cpp | 2 +- .../3d_render_ogl_legacy/c3d_render_ogl_legacy.cpp | 2 +- .../3d_render_ogl_legacy/clayer_triangles.h | 4 ++-- .../accelerators/cbvh_pbrt.cpp | 2 +- .../c3d_render_createscene.cpp | 8 ++++---- .../3d_render_raytracing/c3d_render_raytracing.cpp | 12 +++++------ .../shapes2D/citemlayercsg2d.cpp | 6 ++---- .../3d_render_raytracing/shapes2D/cpolygon2d.cpp | 2 +- .../3d_render_raytracing/shapes3D/clayeritem.cpp | 4 ++-- 3d-viewer/3d_rendering/cimage.cpp | 4 ++-- 3d-viewer/3d_rendering/cpostshader.h | 2 +- 3d-viewer/3d_rendering/trackball.cpp | 12 +++++------ CMakeLists.txt | 6 ++++++ bitmap2component/bitmap2cmp_gui.cpp | 2 +- common/base_struct.cpp | 2 +- common/bezier_curves.cpp | 4 ++-- common/draw_frame.cpp | 4 ++-- common/draw_panel_gal.cpp | 2 +- common/gal/cairo/cairo_gal.cpp | 6 +++--- common/gal/opengl/opengl_compositor.cpp | 6 +++--- common/gal/opengl/opengl_gal.cpp | 2 +- common/gal/opengl/shader.cpp | 2 +- common/lib_table_base.cpp | 2 +- common/page_layout/worksheet_dataitem.cpp | 2 +- common/preview_items/ruler_item.cpp | 2 +- common/utf8.cpp | 2 +- common/view/view.cpp | 4 ++-- common/widgets/footprint_preview_widget.cpp | 4 ++-- common/worksheet_viewitem.cpp | 10 ++++----- common/xnode.cpp | 4 ++-- cvpcb/cvpcb.cpp | 2 +- eeschema/dialogs/dialog_edit_one_field.cpp | 2 +- eeschema/dialogs/dialog_erc.cpp | 2 +- eeschema/eeschema_config.cpp | 4 ++-- eeschema/generate_alias_info.cpp | 2 +- eeschema/hierarch.cpp | 2 +- .../netlist_exporters/netlist_exporter_pspice.cpp | 2 +- eeschema/sch_eagle_plugin.cpp | 4 ++-- eeschema/sch_line.cpp | 6 +++--- eeschema/sch_sheet_path.h | 2 +- .../gerbview_dialog_display_options_frame.cpp | 2 +- gerbview/gerbview_frame.cpp | 2 +- gerbview/select_layers_to_pcb.h | 4 ++-- gerbview/tools/selection_tool.cpp | 4 ++-- include/gal/graphics_abstraction_layer.h | 4 ++-- include/layers_id_colors_and_visibility.h | 6 +++--- include/utf8.h | 6 +++--- pagelayout_editor/block.cpp | 2 +- pagelayout_editor/pl_editor.cpp | 2 +- pagelayout_editor/pl_editor_frame.cpp | 4 ++-- pcb_calculator/pcb_calculator.cpp | 2 +- pcbnew/CMakeLists.txt | 7 +++++++ pcbnew/board_items_to_polygon_shape_transform.cpp | 2 +- pcbnew/class_dimension.cpp | 2 +- pcbnew/class_drawsegment.cpp | 2 +- pcbnew/class_module.cpp | 4 ++-- pcbnew/class_module.h | 4 ++-- pcbnew/class_pcb_target.cpp | 2 +- pcbnew/class_pcb_text.cpp | 2 +- pcbnew/class_track.cpp | 4 ++-- pcbnew/class_track.h | 2 +- pcbnew/class_zone.cpp | 2 +- pcbnew/connectivity_algo.cpp | 10 ++++----- pcbnew/convert_drawsegment_list_to_polygon.cpp | 7 +++---- pcbnew/dialogs/dialog_display_options.cpp | 3 +-- pcbnew/files.cpp | 4 ++-- pcbnew/footprint_info_impl.cpp | 2 +- pcbnew/import_dxf/dxf2brd_items.cpp | 4 ++-- pcbnew/legacy_plugin.cpp | 2 +- pcbnew/pad_draw_functions.cpp | 2 +- pcbnew/pcb_base_frame.cpp | 2 +- pcbnew/pcb_draw_panel_gal.cpp | 2 +- pcbnew/pcb_view.cpp | 2 +- pcbnew/ratsnest.cpp | 2 +- pcbnew/router/pns_diff_pair_placer.cpp | 4 ++-- pcbnew/router/pns_kicad_iface.cpp | 2 +- pcbnew/router/pns_line_placer.cpp | 2 +- pcbnew/router/pns_meander.cpp | 4 ++-- pcbnew/router/pns_sizes_settings.cpp | 2 +- pcbnew/router/router_tool.cpp | 2 +- pcbnew/specctra_import_export/specctra.cpp | 4 ++-- pcbnew/specctra_import_export/specctra.h | 8 ++++---- pcbnew/tools/drawing_tool.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 2 +- pcbnew/tools/pcbnew_control.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 2 +- plugins/3d/idf/s3d_plugin_idf.cpp | 2 +- polygon/clipper.cpp | 24 +++++++++++----------- potrace/trace.cpp | 6 +++--- utils/idftools/idf2vrml.cpp | 4 ++-- 93 files changed, 181 insertions(+), 174 deletions(-) -- 2.11.0
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp