Gui: Use freecad_cast whenever possible

This commit is contained in:
Kacper Donat
2025-04-25 00:07:31 +02:00
committed by Benjamin Nauck
parent 585d277e49
commit ef357aa07a
13 changed files with 38 additions and 38 deletions

View File

@@ -94,7 +94,7 @@ public:
App::DocumentObject *getObject() const {return pcObject;}
/// Get the object of this ViewProvider object as specified type
template <class T>
T *getObject() const { return dynamic_cast<T*>(pcObject); }
T *getObject() const { return freecad_cast<T*>(pcObject); }
/// Asks the view provider if the given object can be deleted.
bool canDelete(App::DocumentObject* obj) const override;
/// Ask the view provider if it accepts object deletions while in edit