Skip to content

Commit

Permalink
[all] Fix warning according to #3889 (#382)
Browse files Browse the repository at this point in the history
* Fix warning according to #3889

* fix warnings in PythonEnv: strcmp, hidden overload
  • Loading branch information
hugtalbot authored Nov 13, 2023
1 parent bb7d9fd commit 6586977
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
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) )
if ( strcmp(p.getModuleName(), sofa_tostring(SOFA_TARGET)) == 0 )
{
pluginLibraryPath = elem.first;
}
Expand Down
1 change: 1 addition & 0 deletions Plugin/src/SofaPython3/PythonEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class SOFAPYTHON3_API PythonEnvironment
/// to be able to react when a scene is loaded
struct SceneLoaderListerner : public SceneLoader::Listener
{
using SceneLoader::Listener::rightBeforeLoadingScene;
/// possibly unload python modules to force importing their eventual modifications
virtual void rightBeforeLoadingScene();
static SceneLoaderListerner* getInstance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ PYBIND11_MODULE(Simulation, simulation)
sofa::simulation::core::init();
sofa::simulation::graph::init();

if(!sofa::simulation::getSimulation())
sofa::simulation::setSimulation(new DAGSimulation());

simulation.doc() =sofapython3::doc::simulation::Class;

simulation.def("print", [](Node* n){ sofa::simulation::node::print(n); }, sofapython3::doc::simulation::print);
Expand Down

0 comments on commit 6586977

Please sign in to comment.