From 788fadf4a8503a5f2d5e4c96aae7dc242bc178bc Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 15 Jun 2015 23:42:37 +0200 Subject: [PATCH] + fix const correctness --- src/Mod/Sketcher/App/Sketch.h | 4 ++-- src/Mod/Sketcher/App/SketchObject.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index 7a3972ad0e..4e1bb17c62 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -316,8 +316,8 @@ public: double calculateConstraintError(int icstr) { return GCSsys.calculateConstraintErrorByTag(icstr);} /// Returns the size of the Geometry - int getGeometrySize(void) {return Geoms.size();} - + int getGeometrySize(void) const {return Geoms.size();} + enum GeoType { None = 0, Point = 1, // 1 Point(start), 2 Parameters(x,y) diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 1ba4a51481..8a01196f0b 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -209,20 +209,20 @@ public: void validateConstraints(); /// gets DoF of last solver execution - int getLastDoF() {return lastDoF;} + int getLastDoF() const {return lastDoF;} /// gets HasConflicts status of last solver execution - bool getLastHasConflicts() {return lastHasConflict;} + bool getLastHasConflicts() const {return lastHasConflict;} /// gets HasRedundancies status of last solver execution - bool getLastHasRedundancies() {return lastHasRedundancies;} + bool getLastHasRedundancies() const {return lastHasRedundancies;} /// gets solver status of last solver execution - int getLastSolverStatus() {return lastSolverStatus;} + int getLastSolverStatus() const {return lastSolverStatus;} /// gets solver SolveTime of last solver execution - float getLastSolveTime() {return lastSolveTime;} + float getLastSolveTime() const {return lastSolveTime;} /// gets the conflicting constraints of the last solver execution const std::vector &getLastConflicting(void) const { return lastConflicting; } /// gets the redundant constraints of last solver execution const std::vector &getLastRedundant(void) const { return lastRedundant; } - + Sketch &getSolvedSketch(void) {return solvedSketch;} protected: