From: vsr Date: Tue, 10 Nov 2015 15:58:30 +0000 (+0300) Subject: gcc 4.9 compatibility X-Git-Tag: V_2.1.0~243^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a562cdee56c48ee1395f5a169eba8dcbe5d29088;p=modules%2Fshaper.git gcc 4.9 compatibility --- diff --git a/src/GeomAPI/GeomAPI_Interface.h b/src/GeomAPI/GeomAPI_Interface.h index fd5c83fce..de51617ae 100644 --- a/src/GeomAPI/GeomAPI_Interface.h +++ b/src/GeomAPI/GeomAPI_Interface.h @@ -19,7 +19,7 @@ class GeomAPI_Interface { private: - std::shared_ptr myImpl; ///< pointer to the internal impl object + std::shared_ptr myImpl; ///< pointer to the internal impl object public: /// None - constructor @@ -28,7 +28,7 @@ class GeomAPI_Interface /// Constructor by the impl pointer (used for internal needs) template explicit GeomAPI_Interface(T* theImpl) { - myImpl.reset(theImpl); + myImpl.reset(reinterpret_cast(theImpl)); } /// Destructor @@ -37,22 +37,22 @@ class GeomAPI_Interface /// Returns the pointer to the impl template inline T* implPtr() { - return static_cast(myImpl.get()); + return reinterpret_cast(myImpl.get()); } /// Returns the pointer to the impl template inline const T* implPtr() const { - return static_cast(myImpl.get()); + return reinterpret_cast(myImpl.get()); } /// Returns the reference object of the impl template inline const T& impl() const { - return *(static_cast(myImpl.get())); + return *(reinterpret_cast(myImpl.get())); } /// Updates the impl (deletes the old one) template inline void setImpl(T* theImpl) { - myImpl.reset(theImpl); + myImpl.reset(reinterpret_cast(theImpl)); } /// Returns true if the impl is empty