Skip to content

Commit

Permalink
Rename method in ECMSingleton
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Mar 29, 2020
1 parent 14a13a4 commit ecea35a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions cpp/scenario/plugins/ECMProvider/ECMProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ void ECMProvider::Configure(const ignition::gazebo::Entity& entity,
ignition::gazebo::EntityComponentManager& ecm,
ignition::gazebo::EventManager& eventMgr)
{
if (ECMSingleton::get().valid()) {
gymppWarning << "The ECM singleton has been already configured" << std::endl;
if (ECMSingleton::Instance().valid()) {
gymppWarning << "The ECM singleton has been already configured"
<< std::endl;
return;
}

gymppDebug << "Storing ECM resources in the singleton" << std::endl;

if (!ECMSingleton::get().storePtrs(&ecm, &eventMgr)) {
gymppError << "Failed to store ECM in the singleton for entity [" << entity << "]"
<< std::endl;
if (!ECMSingleton::Instance().storePtrs(&ecm, &eventMgr)) {
gymppError << "Failed to store ECM in the singleton for entity ["
<< entity << "]" << std::endl;
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/scenario/plugins/ECMProvider/ECMSingleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ECMSingleton::ECMSingleton()
: pImpl{new Impl()}
{}

ECMSingleton& ECMSingleton::get()
ECMSingleton& ECMSingleton::Instance()
{
static ECMSingleton instance;
return instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class scenario::plugins::gazebo::ECMSingleton
ECMSingleton(ECMSingleton&) = delete;
void operator=(const ECMSingleton&) = delete;

static ECMSingleton& get();
static ECMSingleton& Instance();

void clean();
bool valid() const;
Expand Down

0 comments on commit ecea35a

Please sign in to comment.