diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index 4e1bb17c6..19af9c927 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -87,10 +87,11 @@ public: /// retrieves a point Base::Vector3d getPoint(int geoId, PointPos pos); - bool hasConflicts(void) const { return (Conflicting.size() > 0); } - const std::vector &getConflicting(void) const { return Conflicting; } - bool hasRedundancies(void) const { return (Redundant.size() > 0); } - const std::vector &getRedundant(void) const { return Redundant; } + // Inline methods + inline bool hasConflicts(void) const { return !Conflicting.empty(); } + inline const std::vector &getConflicting(void) const { return Conflicting; } + inline bool hasRedundancies(void) const { return !Redundant.empty(); } + inline const std::vector &getRedundant(void) const { return Redundant; } /** set the datum of a distance or angle constraint to a certain value and solve * This can cause the solving to fail! diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 8a01196f0..cb7c3a583 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -209,21 +209,21 @@ public: void validateConstraints(); /// gets DoF of last solver execution - int getLastDoF() const {return lastDoF;} + inline int getLastDoF() const {return lastDoF;} /// gets HasConflicts status of last solver execution - bool getLastHasConflicts() const {return lastHasConflict;} + inline bool getLastHasConflicts() const {return lastHasConflict;} /// gets HasRedundancies status of last solver execution - bool getLastHasRedundancies() const {return lastHasRedundancies;} + inline bool getLastHasRedundancies() const {return lastHasRedundancies;} /// gets solver status of last solver execution - int getLastSolverStatus() const {return lastSolverStatus;} + inline int getLastSolverStatus() const {return lastSolverStatus;} /// gets solver SolveTime of last solver execution - float getLastSolveTime() const {return lastSolveTime;} + inline float getLastSolveTime() const {return lastSolveTime;} /// gets the conflicting constraints of the last solver execution - const std::vector &getLastConflicting(void) const { return lastConflicting; } + inline 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;} + inline const std::vector &getLastRedundant(void) const { return lastRedundant; } + /// gets the solved sketch as a reference + inline Sketch &getSolvedSketch(void) {return solvedSketch;} protected: /// get called by the container when a property has changed