Skip to content

Commit

Permalink
fix some const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 29, 2019
1 parent e33a90d commit a9f8204
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Gui/View3DInventorViewer.cpp
Expand Up @@ -971,7 +971,7 @@ SbBool View3DInventorViewer::hasViewProvider(ViewProvider* pcProvider) const
SbBool View3DInventorViewer::containsViewProvider(const ViewProvider* vp) const
{
SoSearchAction sa;
sa.setNode(const_cast<ViewProvider*>(vp)->getRoot());
sa.setNode(vp->getRoot());
sa.setSearchingAll(true);
sa.apply(getSoRenderManager()->getSceneGraph());
return sa.getPath() != nullptr;
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/ViewProvider.h
Expand Up @@ -128,10 +128,10 @@ class GuiExport ViewProvider : public App::TransactionalObject
virtual ~ViewProvider();

// returns the root node of the Provider (3D)
virtual SoSeparator* getRoot(void){return pcRoot;}
virtual SoSeparator* getRoot(void) const {return pcRoot;}
// return the mode switch node of the Provider (3D)
SoSwitch *getModeSwitch(void){return pcModeSwitch;}
SoTransform *getTransformNode(){return pcTransform;}
SoSwitch *getModeSwitch(void) const {return pcModeSwitch;}
SoTransform *getTransformNode() const {return pcTransform;}
// returns the root for the Annotations.
SoSeparator* getAnnotation(void);
// returns the root node of the Provider (3D)
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/ViewProviderPythonFeature.h
Expand Up @@ -223,7 +223,7 @@ class ViewProviderPythonFeatureT : public ViewProviderT

/** @name Nodes */
//@{
virtual SoSeparator* getRoot() override {
virtual SoSeparator* getRoot() const override {
return ViewProviderT::getRoot();
}
virtual SoSeparator* getFrontRoot() const override {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Mesh/Gui/ViewProvider.h
Expand Up @@ -96,7 +96,7 @@ class MeshGuiExport ViewProviderExport : public Gui::ViewProviderDocumentObject
virtual ~ViewProviderExport();

virtual QIcon getIcon() const;
SoSeparator* getRoot(void){return 0;}
SoSeparator* getRoot(void) const {return nullptr;}
std::vector<std::string> getDisplayModes(void) const;
const char* getDefaultDisplayMode() const;
};
Expand Down

0 comments on commit a9f8204

Please sign in to comment.