Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Dec 14, 2021
1 parent 41c64b8 commit 7736c94
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions include/ignition/gazebo/detail/View.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef IGNITION_GAZEBO_DETAIL_VIEW_HH_
#define IGNITION_GAZEBO_DETAIL_VIEW_HH_

#include <memory>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
Expand Down
2 changes: 1 addition & 1 deletion src/Component_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class NoSerialize : public components::BaseComponent
return 0;
}

public: std::unique_ptr<BaseComponent> Clone() const override
public: std::unique_ptr<BaseComponent> Clone() const override
{
return nullptr;
}
Expand Down
13 changes: 7 additions & 6 deletions src/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,12 @@ void EntityComponentManagerPrivate::Copy(
this->descendantCache.clear();
this->entityCount = _from.entityCount;
this->removedComponents = _from.removedComponents;
this->componentsMarkedAsRemoved= _from.componentsMarkedAsRemoved;
this->componentsMarkedAsRemoved = _from.componentsMarkedAsRemoved;

for (const auto &[entity, comps] : _from.componentStorage)
{
this->componentStorage[entity].clear();
for (const auto &comp: comps)
for (const auto &comp : comps)
{
this->componentStorage[entity].emplace_back(comp->Clone());
}
Expand All @@ -325,8 +325,8 @@ void EntityComponentManagerPrivate::Copy(
this->componentTypeIndexIterators.clear();
this->componentTypeIndexDirty = true;

// Not copying maps related to cloning since they are transient variables that
// are used as return values of some member functions.
// Not copying maps related to cloning since they are transient variables
// that are used as return values of some member functions.

this->pinnedEntities = _from.pinnedEntities;
}
Expand Down Expand Up @@ -2185,8 +2185,9 @@ void EntityComponentManager::ApplyDiff(const EntityComponentManager &_other,
{
this->dataPtr->CreateEntityImplementation(entity);
this->RequestRemoveEntity(entity, false);
// We want to set this entity as "removed", but CreateEntityImplementation
// set's is as "newlyCreated", so remove it from that list.
// We want to set this entity as "removed", but
// CreateEntityImplementation sets it as "newlyCreated",
// so remove it from that list.
{
std::lock_guard<std::mutex> lock(this->dataPtr->entityCreatedMutex);
this->dataPtr->newlyCreatedEntities.erase(entity);
Expand Down
2 changes: 2 additions & 0 deletions src/EntityComponentManagerDiff.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "ignition/gazebo/Export.hh"
#include "ignition/gazebo/Types.hh"

#include <vector>

namespace ignition
{
namespace gazebo
Expand Down
2 changes: 1 addition & 1 deletion src/EntityComponentManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3173,7 +3173,7 @@ TEST_P(EntityComponentManagerFixture, ComputDiff)
EXPECT_EQ(0u, diff.RemovedEntities().size());
}

// Now add another component to managerCopy. We should expect one more entity
// Now add another component to managerCopy. We should expect one more entity
// in RemovedEntities
managerCopy.SetEntityCreateOffset(10);
managerCopy.CreateEntity();
Expand Down
4 changes: 2 additions & 2 deletions src/SimulationRunner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ namespace ignition
/// \brief Manager of all components.
private: EntityComponentManager entityCompMgr;

/// \brief Copy of the EntityComponentManager immediately after the
/// initial entity creation/world load.
/// \brief Copy of the EntityComponentManager immediately after the
/// initial entity creation/world load.
private: EntityComponentManager initialEntityCompMgr;

/// \brief Manager of all levels.
Expand Down

0 comments on commit 7736c94

Please sign in to comment.