fix some const correctness

This commit is contained in:
wmayer
2019-12-29 17:13:18 +01:00
parent e33a90dc50
commit a9f820470b
4 changed files with 6 additions and 6 deletions

View File

@@ -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;

View File

@@ -128,10 +128,10 @@ public:
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)

View File

@@ -223,7 +223,7 @@ public:
/** @name Nodes */
//@{
virtual SoSeparator* getRoot() override {
virtual SoSeparator* getRoot() const override {
return ViewProviderT::getRoot();
}
virtual SoSeparator* getFrontRoot() const override {

View File

@@ -96,7 +96,7 @@ public:
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;
};