From ce46d97bd541592d08d6a5816f0e7f870ba33b4c Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Mon, 19 Nov 2012 09:06:04 +0200 Subject: [PATCH] Comment out useless code in flowcanvas and make the clang static analyzer happy --- gui/flowcanvas/Connection.cpp | 6 +++--- gui/flowcanvas/Module.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gui/flowcanvas/Connection.cpp b/gui/flowcanvas/Connection.cpp index 26bf2fc9..b4145be2 100644 --- a/gui/flowcanvas/Connection.cpp +++ b/gui/flowcanvas/Connection.cpp @@ -182,10 +182,10 @@ Connection::update_location() if (_show_arrowhead) { - const double h = sqrt(dx*dx + dy*dy); + //const double h = sqrt(dx*dx + dy*dy); - dx = dx / h * 10; - dy = dy / h * 10; + //dx = dx / h * 10; + //dy = dy / h * 10; gnome_canvas_path_def_lineto(_path, dst_x - 12, diff --git a/gui/flowcanvas/Module.cpp b/gui/flowcanvas/Module.cpp index ad83b3d3..9b5f6f43 100644 --- a/gui/flowcanvas/Module.cpp +++ b/gui/flowcanvas/Module.cpp @@ -593,14 +593,14 @@ Module::resize_horiz() header_height += _icon_size - _title_height; } - double height = header_height; + double height;// = header_height; - double above_h = 0.0f; - if (_ports.size() > 0) - above_h += _ports.size() * ((*_ports.begin())->height()+2.0); + //double above_h = 0.0f; + //if (_ports.size() > 0) + // above_h += _ports.size() * ((*_ports.begin())->height()+2.0); //double between_h = std::max(above_h, _embed_height); - above_h += _embed_height; + //above_h += _embed_height; /*cerr << above_w << "x" << above_h << "(" << above_w * above_h << ") ? " << between_w << "x" << between_h << "(" << between_w * between_h << ")" << endl;*/ @@ -620,8 +620,8 @@ Module::resize_horiz() } if (!_title_visible) { - if (_ports.size() > 0) - height += 0.5; + //if (_ports.size() > 0) + // height += 0.5; if (_widest_input == 0.0 || _widest_output == 0.0f) width += 10.0; }