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 19, 2020
1 parent 2bf7223 commit 99fcbc0
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 @@ -57,16 +57,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 @@ -43,7 +43,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 @@ -50,7 +50,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 99fcbc0

Please sign in to comment.