diff --git a/src/App/ComplexGeoData.h b/src/App/ComplexGeoData.h index 34977126f343..629ad67af927 100644 --- a/src/App/ComplexGeoData.h +++ b/src/App/ComplexGeoData.h @@ -137,13 +137,13 @@ class AppExport ComplexGeoData: public Base::Persistence, public Base::Handled { return Base::Vector3d(); } /** Get points from object with given accuracy */ virtual void getPoints(std::vector &Points, - float Accuracy, uint16_t flags=0) const {}; + float Accuracy, uint16_t flags=0) const {} /** Get lines from object with given accuracy */ virtual void getLines(std::vector &Points,std::vector &lines, - float Accuracy, uint16_t flags=0) const {}; + float Accuracy, uint16_t flags=0) const {} /** Get faces from object with given accuracy */ virtual void getFaces(std::vector &Points,std::vector &faces, - float Accuracy, uint16_t flags=0) const {}; + float Accuracy, uint16_t flags=0) const {} //@} protected: diff --git a/src/App/PropertyContainer.h b/src/App/PropertyContainer.h index 949a77dc64ac..fac9e5666b5e 100644 --- a/src/App/PropertyContainer.h +++ b/src/App/PropertyContainer.h @@ -159,9 +159,9 @@ class AppExport PropertyContainer: public Base::Persistence protected: /// get called by the container when a property has changed - virtual void onChanged(const Property* /*prop*/){}; + virtual void onChanged(const Property* /*prop*/){} /// get called before the value is changed - virtual void onBeforeChange(const Property* /*prop*/){}; + virtual void onBeforeChange(const Property* /*prop*/){} //void hasChanged(Propterty* prop); static const PropertyData * getPropertyDataPtr(void); diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index a42b84e441dc..f132132238bf 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -136,7 +136,7 @@ class AppExport PropertyVectorList: public PropertyLists void setValues (const std::vector& values); - void setValue (void){}; + void setValue (void){} const std::vector &getValues(void) const { return _lValueList; diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index 706fffe1b5a2..91c8b3c594f1 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -373,7 +373,7 @@ class AppExport PropertyMap: public Property /** Sets the property */ - void setValue(void){}; + void setValue(void){} void setValue(const std::string& key,const std::string& value); void setValues(const std::map&); @@ -525,7 +525,7 @@ class AppExport PropertyFloatList: public PropertyLists */ void setValue(double); - void setValue (void){}; + void setValue (void){} /// index operator double operator[] (const int idx) const {return _lValueList.operator[] (idx);} diff --git a/src/Base/Axis.h b/src/Base/Axis.h index 54b5d41c07ca..8c803c58e444 100644 --- a/src/Base/Axis.h +++ b/src/Base/Axis.h @@ -40,7 +40,7 @@ class BaseExport Axis Axis(const Axis&); Axis(const Vector3d& Orig, const Vector3d& Dir); /// Destruction - ~Axis () {}; + ~Axis () {} const Vector3d& getBase(void) const {return _base;} const Vector3d& getDirection(void) const {return _dir;} diff --git a/src/Base/Console.h b/src/Base/Console.h index 8b2e04eac481..1a19c6245725 100644 --- a/src/Base/Console.h +++ b/src/Base/Console.h @@ -52,7 +52,7 @@ namespace Base { class ConsoleSingleton; -}; // namespace Base +} // namespace Base typedef Base::ConsoleSingleton ConsoleMsgType; typedef unsigned int ConsoleMsgFlags; @@ -72,13 +72,13 @@ class BaseExport ConsoleObserver :bErr(true),bMsg(true),bLog(true),bWrn(true) {} virtual ~ConsoleObserver() {} /// get calles when a Warning is issued - virtual void Warning(const char *){}; + virtual void Warning(const char *){} /// get calles when a Message is issued - virtual void Message(const char *){}; + virtual void Message(const char *){} /// get calles when a Error is issued virtual void Error (const char *)=0; /// get calles when a Log Message is issued - virtual void Log (const char *){}; + virtual void Log (const char *){} virtual const char *Name(void){return 0L;} bool bErr,bMsg,bLog,bWrn; diff --git a/src/Base/Matrix.h b/src/Base/Matrix.h index 9e069ef49670..24434fdd4fb3 100644 --- a/src/Base/Matrix.h +++ b/src/Base/Matrix.h @@ -59,7 +59,7 @@ class BaseExport Matrix4D Matrix4D (const Vector3f& rclBase, const Vector3f& rclDir, float fAngle); Matrix4D (const Vector3d& rclBase, const Vector3d& rclDir, double fAngle); /// Destruction - ~Matrix4D () {}; + ~Matrix4D () {} /** @name Operators */ //@{ diff --git a/src/Base/Observer.h b/src/Base/Observer.h index 70dcb5d7fa08..0aabd0be25af 100644 --- a/src/Base/Observer.h +++ b/src/Base/Observer.h @@ -56,13 +56,13 @@ class Observer * A constructor. * No special function so far. */ - Observer(){}; + Observer(){} /** * A destructor. * No special function so far. */ - virtual ~Observer(){}; + virtual ~Observer(){} /** * This method need to be reimplemented from the concrete Observer @@ -108,7 +108,7 @@ class Subject * A constructor. * No special function so far. */ - Subject(){}; + Subject(){} /** * A destructor. diff --git a/src/Base/Placement.h b/src/Base/Placement.h index 86463d9ca220..9463fbac8ddd 100644 --- a/src/Base/Placement.h +++ b/src/Base/Placement.h @@ -46,7 +46,7 @@ class BaseExport Placement Placement(const Vector3d& Pos, const Rotation &Rot); Placement(const Vector3d& Pos, const Rotation &Rot, const Vector3d& Cnt); /// Destruction - ~Placement () {}; + ~Placement () {} Matrix4D toMatrix(void) const; void fromMatrix(const Matrix4D& m); diff --git a/src/Base/PyObjectBase.h b/src/Base/PyObjectBase.h index 33fa878e53bc..fe1e3b026950 100644 --- a/src/Base/PyObjectBase.h +++ b/src/Base/PyObjectBase.h @@ -37,13 +37,13 @@ #undef slots #include #ifdef FC_OS_MACOSX -#undef toupper -#undef tolower -#undef isupper -#undef islower -#undef isspace -#undef isalpha -#undef isalnum +#undef toupper +#undef tolower +#undef isupper +#undef islower +#undef isspace +#undef isalpha +#undef isalnum #endif #define slots #include @@ -66,12 +66,12 @@ * @see PYFUNCIMP_S * @see FCPythonExport */ -#define PYFUNCDEF_S(SFUNC) static PyObject* SFUNC (PyObject *self,PyObject *args,PyObject *kwd); +#define PYFUNCDEF_S(SFUNC) static PyObject* SFUNC (PyObject *self,PyObject *args,PyObject *kwd) /** Python static class macro for implementation * used to set up a implementation for PYFUNCDEF_S definition. - * Its a pure convenience macro. You can also do + * Its a pure convenience macro. You can also do * it by hand if you want. It looks like that: * \code * PyObject* CLASS::SFUNC (PyObject *self,PyObject *args,PyObject *kwd) @@ -104,7 +104,7 @@ namespace Base { inline int streq(const char *A, const char *B) // define "streq" -{ return strcmp(A,B) == 0;}; +{ return strcmp(A,B) == 0;} inline void Assert(int expr, char *msg) // C++ assert @@ -124,7 +124,7 @@ inline void Assert(int expr, char *msg) // C++ assert /// some basic python macros #define Py_NEWARGS 1 -/// return with no return value if nothing happens +/// return with no return value if nothing happens #define Py_Return Py_INCREF(Py_None); return Py_None; /// returns an error #define Py_Error(E, M) {PyErr_SetString(E, M); return NULL;} @@ -144,7 +144,7 @@ public: \ static PyTypeObject Type; \ static PyMethodDef Methods[]; \ static PyParentObject Parents[]; \ - virtual PyTypeObject *GetType(void) {return &Type;}; \ + virtual PyTypeObject *GetType(void) {return &Type;} \ virtual PyParentObject *GetParents(void) {return Parents;} /** This defines the _getattr_up macro @@ -177,12 +177,12 @@ namespace Base * very important because nearly all important classes in FreeCAD * are visible in python for macro recording and automation purpose. * The class App::Document is a good expample for an exported class. - * There are some convenience macros to make it easier to inherit + * There are some convenience macros to make it easier to inherit * from this class and defining new methods exported to python. * PYFUNCDEF_D defines a new exported method. * PYFUNCIMP_D defines the implementation of the new exported method. * In the implementation you can use Py_Return, Py_Error, Py_Try and Py_Assert. - * PYMETHODEDEF makes the entry in the python method table. + * PYMETHODEDEF makes the entry in the python method table. * @see Document * @see PYFUNCDEF_D * @see PYFUNCIMP_D @@ -198,7 +198,7 @@ class BaseExport PyObjectBase : public PyObject * Every PyObjectBase object is also a python object. So you can use * every Python C-Library function also on a PyObjectBase object */ - Py_Header; + Py_Header protected: /// destructor @@ -206,7 +206,7 @@ class BaseExport PyObjectBase : public PyObject public: /** Constructor - * Sets the Type of the object (for inheritance) and decrease the + * Sets the Type of the object (for inheritance) and decrease the * the reference count of the PyObject. */ PyObjectBase(void*, PyTypeObject *T); @@ -219,20 +219,20 @@ class BaseExport PyObjectBase : public PyObject PyObjectBase* DecRef(void) {Py_DECREF(this);return this;} /** GetAttribute implementation - * This method implements the retrieval of object attributes. + * This method implements the retrieval of object attributes. * If you want to implement attributes in your class, reimplement * this method. * You have to call the method of the base class. * Note: if you reimplement _gettattr() in a inheriting class you * need to call the method of the base class! Otherwise even the - * methods of the object will disappear! + * methods of the object will disappear! */ virtual PyObject *_getattr(char *attr); /// static wrapper for pythons _getattr() static PyObject *__getattr(PyObject * PyObj, char *attr); /** SetAttribute implementation - * This method implements the setting of object attributes. + * This method implements the setting of object attributes. * If you want to implement attributes in your class, reimplement * this method. * You have to call the method of the base class. @@ -242,14 +242,14 @@ class BaseExport PyObjectBase : public PyObject static int __setattr(PyObject *PyObj, char *attr, PyObject *value); /** _repr method - * Override this method to return a string object with some - * information about the object. + * Override this method to return a string object with some + * information about the object. * \code * PyObject *MeshFeaturePy::_repr(void) * { * std::stringstream a; * a << "MeshFeature: [ "; - * a << "some really important info about the object!"; + * a << "some really important info about the object!"; * a << "]" << std::endl; * return Py_BuildValue("s", a.str().c_str()); * } @@ -266,7 +266,7 @@ class BaseExport PyObjectBase : public PyObject } /** PyInit method - * Override this method to initialize a newly created + * Override this method to initialize a newly created * instance of the class (Constuctor) */ virtual int PyInit(PyObject* /*args*/, PyObject* /*kwd*/) @@ -336,8 +336,8 @@ class BaseExport PyObjectBase : public PyObject static PyObject * s##DFUNC (PyObject *self, PyObject *args, PyObject * /*kwd*/){return (( CLASS *)self)-> DFUNC (args);}; /** Python dynamic class macro for implementation - * used to set up an implementation for PYFUNCDEF_D definition. - * Its a pure convenience macro. You can also do + * used to set up an implementation for PYFUNCDEF_D definition. + * Its a pure convenience macro. You can also do * it by hand if you want. It looks like that: * \code * PyObject *FCPyParametrGrp::PyGetGrp(PyObject *args) @@ -353,7 +353,7 @@ static PyObject * s##DFUNC (PyObject *self, PyObject *args, PyObject * /*kwd*/){ /** Python dynamic class macro for the method list * used to fill the method list of a class derived from PyObjectBase. - * Its a pure convenience macro. You can also do + * Its a pure convenience macro. You can also do * it by hand if you want. It looks like that: * \code * PyMethodDef DocTypeStdPy::Methods[] = { diff --git a/src/Base/Quantity.h b/src/Base/Quantity.h index 8dd5645f7d2f..b11d6f974348 100644 --- a/src/Base/Quantity.h +++ b/src/Base/Quantity.h @@ -47,7 +47,7 @@ class BaseExport Quantity Quantity(const Quantity&); Quantity(double Value, const Unit& unit=Unit()); /// Destruction - ~Quantity () {}; + ~Quantity () {} /** Operators. */ //@{ diff --git a/src/Base/Unit.h b/src/Base/Unit.h index 33ac53d3f0b4..6be966ef8177 100644 --- a/src/Base/Unit.h +++ b/src/Base/Unit.h @@ -57,7 +57,7 @@ class BaseExport Unit Unit(const Unit&); Unit(const std::string& Pars); /// Destruction - ~Unit () {}; + ~Unit () {} /** Operators. */ diff --git a/src/Base/Vector3D.h b/src/Base/Vector3D.h index 96bd16ab3625..de582c676877 100644 --- a/src/Base/Vector3D.h +++ b/src/Base/Vector3D.h @@ -218,7 +218,7 @@ template inline Vector3<_Pr1> toVector(const Vector3<_Pr2>& v) { return Vector3<_Pr1>((_Pr1)v.x,(_Pr1)v.y,(_Pr1)v.z); -}; +} typedef Vector3 Vector3f; typedef Vector3 Vector3d; @@ -260,7 +260,7 @@ inline _Vec1 convertTo(const _Vec2& v) typedef typename traits_out::float_type float_type; traits_type t(v); return _Vec1((float_type)t.x(),(float_type)t.y(),(float_type)t.z()); -}; +} } // namespace Base diff --git a/src/Base/ViewProj.h b/src/Base/ViewProj.h index 7fb82a40e3ab..af595f80d032 100644 --- a/src/Base/ViewProj.h +++ b/src/Base/ViewProj.h @@ -36,8 +36,8 @@ namespace Base { class BaseExport ViewProjMethod { public: - virtual ~ViewProjMethod(){}; - virtual bool isValid() const { return true; }; + virtual ~ViewProjMethod(){} + virtual bool isValid() const { return true; } /** Convert 3D point to 2D projection plane */ virtual Vector3f operator()(const Vector3f &rclPt) const = 0; /** Convert 3D point to 2D projection plane */ @@ -50,7 +50,7 @@ class BaseExport ViewProjMethod virtual Matrix4D getProjectionMatrix (void) const = 0; protected: - ViewProjMethod(){}; + ViewProjMethod(){} }; /** @@ -60,8 +60,8 @@ class BaseExport ViewProjMethod class BaseExport ViewProjMatrix : public ViewProjMethod { public: - ViewProjMatrix (const Matrix4D &rclMtx) : _clMtx(rclMtx) { _clMtxInv = _clMtx; _clMtxInv.inverse(); }; - virtual ~ViewProjMatrix(){}; + ViewProjMatrix (const Matrix4D &rclMtx) : _clMtx(rclMtx) { _clMtxInv = _clMtx; _clMtxInv.inverse(); } + virtual ~ViewProjMatrix(){} inline Vector3f operator()(const Vector3f &rclPt) const; inline Vector3d operator()(const Vector3d &rclPt) const; diff --git a/src/Gui/DockWindow.h b/src/Gui/DockWindow.h index 5293d9138e60..a616e70e7017 100644 --- a/src/Gui/DockWindow.h +++ b/src/Gui/DockWindow.h @@ -46,7 +46,7 @@ class Application; */ class GuiExport DockWindow : public QWidget, public BaseView { - Q_OBJECT; + Q_OBJECT public: /** View constructor @@ -64,13 +64,13 @@ class GuiExport DockWindow : public QWidget, public BaseView */ //@{ /// get called when the document is updated - virtual void onUpdate(void){}; + virtual void onUpdate(void){} /// returns the name of the view (important for messages) - virtual const char *getName(void) const { return "DockWindow"; }; + virtual const char *getName(void) const { return "DockWindow"; } /// Message handler - virtual bool onMsg(const char* pMsg,const char** ppReturn){ return false; }; + virtual bool onMsg(const char* pMsg,const char** ppReturn){ return false; } /// Message handler test - virtual bool onHasMsg(const char* pMsg) const { return false; }; + virtual bool onHasMsg(const char* pMsg) const { return false; } /// overwrite when checking on close state virtual bool canClose(void){return true;} //@} diff --git a/src/Gui/MDIView.h b/src/Gui/MDIView.h index eb086c53bd18..fa7ebcb884bf 100644 --- a/src/Gui/MDIView.h +++ b/src/Gui/MDIView.h @@ -45,7 +45,7 @@ class Document; */ class GuiExport MDIView : public QMainWindow, public BaseView { - Q_OBJECT; + Q_OBJECT TYPESYSTEM_HEADER(); diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index 75fa8dafdab4..d1679a4af09a 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -124,7 +124,7 @@ class GuiExport ViewProvider : public App::PropertyContainer virtual std::vector getPickedPoints(const SoPickedPoint *) const; /// return the higlight lines for a given element or the whole shape virtual std::vector getSelectionShape(const char* Element) const - { return std::vector(); }; + { return std::vector(); } /// get called if the object is about to get deleted. Here you can delete other objects to or switch visibility of others. virtual bool onDelete(const std::vector &) { return true;} diff --git a/src/Gui/ViewProviderDocumentObject.h b/src/Gui/ViewProviderDocumentObject.h index 659fdbf273c0..fd3cfcf74b9b 100644 --- a/src/Gui/ViewProviderDocumentObject.h +++ b/src/Gui/ViewProviderDocumentObject.h @@ -77,7 +77,7 @@ class GuiExport ViewProviderDocumentObject : public ViewProvider /// Run a redraw void updateView(); /// Gets called if some of the property hade bin changed - virtual void updateData(const App::Property*){}; + virtual void updateData(const App::Property*){} /// Get the object of this ViewProvider object App::DocumentObject *getObject(void) const {return pcObject;} /// Get the python wrapper for that ViewProvider diff --git a/src/Mod/Part/App/FT2FC.cpp b/src/Mod/Part/App/FT2FC.cpp index 23a36fd40d38..a458c9ccc6d1 100644 --- a/src/Mod/Part/App/FT2FC.cpp +++ b/src/Mod/Part/App/FT2FC.cpp @@ -108,7 +108,7 @@ PyObject* FT2FC(const Py_UNICODE *PyUString, std::stringstream ErrorMsg; double PenPos = 0, scalefactor; UNICHAR prevchar = 0, currchar = 0; - int cadv, PyErr; + int cadv; size_t i; PyObject *WireList, *CharList; @@ -266,10 +266,9 @@ static FT_Outline_Funcs FTcbFuncs = { PyObject* getGlyphContours(FT_Face FTFont, UNICHAR currchar, double PenPos, double Scale) { FT_Error error = 0; std::stringstream ErrorMsg; - int PyErr; gp_Pnt origin = gp_Pnt(0.0,0.0,0.0); FTDC_Ctx ctx; - + ctx.currchar = currchar; ctx.surf = new Geom_Plane(origin,gp::DZ());