Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all] Fix warnings #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugin/src/SofaPython3/PythonEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void PythonEnvironment::Init()
for( const auto& elem : map)
{
Plugin p = elem.second;
if ( p.getModuleName() == sofa_tostring(SOFA_TARGET) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the warning in this case?

if ( strcmp( p.getModuleName(), sofa_tostring(SOFA_TARGET)) == 0 )
{
pluginLibraryPath = elem.first;
}
Expand Down
2 changes: 1 addition & 1 deletion Plugin/src/SofaPython3/PythonEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SOFAPYTHON3_API PythonEnvironment
struct SceneLoaderListerner : public SceneLoader::Listener
{
/// possibly unload python modules to force importing their eventual modifications
virtual void rightBeforeLoadingScene();
virtual void rightBeforeLoadingScene() override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual void rightBeforeLoadingScene() override;
virtual void rightBeforeLoadingScene(SceneLoader* sceneLoader) override;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also implies that sceneLoader is unused in the implementation of this function in the cpp file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was not just a warning. It is a bug introduced by sofa-framework/sofa#3799 because the override keyword was missing in the first place.

static SceneLoaderListerner* getInstance() {
static SceneLoaderListerner sceneLoaderListerner;
return &sceneLoaderListerner; }
Expand Down
Loading