Skip to content

Commit

Permalink
address compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSegert committed Jun 20, 2018
1 parent 7f06171 commit a37d268
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion dataselectdialog.cpp
Expand Up @@ -132,7 +132,6 @@ void DataSelectDialog::detect_file_type()
}

bool raw = false;
bool function=true;
QString partial("");
auto error_header_len = QString("INPUT ERROR: ").length();
auto error_footer_len = QString(" :END").length();
Expand Down
9 changes: 5 additions & 4 deletions interface/control_dot.cpp
Expand Up @@ -34,12 +34,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <sstream>

ControlDot::ControlDot(SliceLine* line, bool left_bottom, ConfigParameters* params)
: slice_line(line)
:
position_lock(false)
, slice_line(line)
, config_params(params)
, pressed(false)
, left_bottom(left_bottom)
, update_lock(false)
, position_lock(false)
{
setFlag(ItemIsMovable);
setFlag(ItemSendsGeometryChanges);
Expand Down Expand Up @@ -133,10 +134,10 @@ QVariant ControlDot::itemChange(GraphicsItemChange change, const QVariant& value

set_position(newpos);
if (left_bottom){
slice_line->update_lb_endpoint(newpos);
slice_line->update_lb_endpoint();
}
else
slice_line->update_rt_endpoint(newpos);
slice_line->update_rt_endpoint();

//return
return newpos;
Expand Down
1 change: 0 additions & 1 deletion interface/persistence_diagram.cpp
Expand Up @@ -281,7 +281,6 @@ void PersistenceDiagram::draw_dots()
double radius_scale = diagram_size / 600.0; //used to change the radius in accordance with a change in size of application window
//"magic number"-probably bad

double slice_line_len = line_size / scale;

double eps=pow(10.0,-3.0); //"wiggle room" to account for rounding errors
//dots will be shown on the persistence diagram if they lie in the epsilon-neighborhood of the diagram
Expand Down
4 changes: 2 additions & 2 deletions interface/slice_line.cpp
Expand Up @@ -177,7 +177,7 @@ QVariant SliceLine::itemChange(GraphicsItemChange change, const QVariant& value)

//updates left-bottom endpoint
//is the newpos argument needed????
void SliceLine::update_lb_endpoint(QPointF& newpos)
void SliceLine::update_lb_endpoint()
{
//ensure that top right point does not change
update_lock = true;
Expand Down Expand Up @@ -209,7 +209,7 @@ void SliceLine::update_lb_endpoint(QPointF& newpos)
}

//updates right-top endpoint
void SliceLine::update_rt_endpoint(QPointF& newpos)
void SliceLine::update_rt_endpoint()
{

update_lock = true;
Expand Down
4 changes: 2 additions & 2 deletions interface/slice_line.h
Expand Up @@ -44,8 +44,8 @@ class SliceLine : public QGraphicsItem {

QVariant itemChange(GraphicsItemChange change, const QVariant& value);

void update_lb_endpoint(QPointF& newpos); //updates left-bottom endpoint; called by ControlDot on move event
void update_rt_endpoint(QPointF& newpos); //updates right-top endpoint; called by ControlDot on move event
void update_lb_endpoint(); //updates left-bottom endpoint; called by ControlDot on move event
void update_rt_endpoint(); //updates right-top endpoint; called by ControlDot on move event

double get_right_pt_x(); //gets x-coordinate of right-top endpoint (units: pixels)
double get_right_pt_y(); //gets y-coordinate of right-top endpoint (units: pixels)
Expand Down

0 comments on commit a37d268

Please sign in to comment.