Skip to content

Commit ba547d4

Browse files
committed
Fixed bad indentations in the code
change variable it2 to it and I change the parameter passed to the getCaterories method to a constant reference
1 parent 80ce16a commit ba547d4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Module_SofaRuntime.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ using sofa::helper::system::PluginRepository;
3838
using sofa::simulation::SceneLoaderFactory;
3939
using sofa::simulation::SceneLoader;
4040

41-
//
41+
4242
#include <pybind11/stl.h>
4343
#include <sofa/core/ObjectFactory.h>
4444
using sofa::core::ObjectFactory;
4545
#include <sofa/core/CategoryLibrary.h>
4646
using sofa::core::CategoryLibrary;
47-
//
47+
4848

4949

5050
#include <SofaPython3/SceneLoaderPY3.h>
@@ -91,21 +91,21 @@ class SofaInitializer
9191
}
9292
};
9393

94-
static std::vector<std::string> getCategories(std::string className)
94+
static std::vector<std::string> getCategories(const std::string& className)
9595
{
9696
std::vector<std::string> categories;
9797
ObjectFactory* factory = ObjectFactory::getInstance();
9898

9999
if (factory->hasCreator(className))
100100
{
101-
ObjectFactory::ClassEntry entry = factory->getEntry(className);
102-
ObjectFactory::CreatorMap::iterator it2 = entry.creatorMap.begin();
101+
ObjectFactory::ClassEntry& entry = factory->getEntry(className);
102+
ObjectFactory::CreatorMap::iterator it = entry.creatorMap.begin();
103103

104-
if( it2 != entry.creatorMap.end())
104+
if( it != entry.creatorMap.end())
105105
{
106-
ObjectFactory::Creator::SPtr c = it2->second;
107-
const sofa::core::objectmodel::BaseClass* objClass = c->getClass();
108-
CategoryLibrary::getCategories(objClass,categories);
106+
ObjectFactory::Creator::SPtr c = it->second;
107+
const sofa::core::objectmodel::BaseClass* objClass = c->getClass();
108+
CategoryLibrary::getCategories(objClass,categories);
109109
}
110110
}
111111
return categories ;

0 commit comments

Comments
 (0)