PVS issues:

consistently define copy constructor and assignment operator
remove superfluous casts
initialize member variables in constructor
avoid double assignment
This commit is contained in:
wmayer
2019-03-04 11:53:49 +01:00
parent d28e6a6ae7
commit 28b195d6e2
16 changed files with 63 additions and 22 deletions

View File

@@ -298,7 +298,8 @@ PyObject* DocumentPy::toggleTreeItem(PyObject *args)
// get the gui document of the Assembly Item
//ActiveAppDoc = Item->getDocument();
//ActiveGuiDoc = Gui::Application::Instance->getDocument(getDocumentPtr());
Gui::ViewProviderDocumentObject* ActiveVp = dynamic_cast<Gui::ViewProviderDocumentObject*> (getDocumentPtr()->getViewProvider(Object)) ;
Gui::ViewProviderDocumentObject* ActiveVp = dynamic_cast<Gui::ViewProviderDocumentObject*> (getDocumentPtr()->getViewProvider(Object));
assert(ActiveVp);
switch(mod) {
case 0: getDocumentPtr()->signalExpandObject(*ActiveVp,Gui::ToggleItem); break;
case 1: getDocumentPtr()->signalExpandObject(*ActiveVp,Gui::CollapseItem); break;