1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Apply some refactoring

This commit is contained in:
Christian F. Coors
2017-10-03 00:00:32 +02:00
committed by Michael Steenbeek
parent 386a399a51
commit 06afeeda9a
60 changed files with 221 additions and 292 deletions

View File

@@ -65,7 +65,7 @@ private:
static constexpr auto PATTERN = "*.td4;*.td6";
public:
TrackDesignFileIndex(IPlatformEnvironment * env) :
explicit TrackDesignFileIndex(IPlatformEnvironment * env) :
FileIndex("track design index",
MAGIC_NUMBER,
VERSION,
@@ -141,16 +141,14 @@ private:
std::vector<TrackRepositoryItem> _items;
public:
TrackDesignRepository(IPlatformEnvironment * env)
explicit TrackDesignRepository(IPlatformEnvironment * env)
: _env(env),
_fileIndex(env)
{
Guard::ArgumentNotNull(env);
}
virtual ~TrackDesignRepository() final
{
}
~TrackDesignRepository() = default;
size_t GetCount() const override
{
@@ -291,7 +289,7 @@ public:
{
_items.clear();
auto trackDesigns = _fileIndex.LoadOrBuild();
for (auto td : trackDesigns)
for (const auto &td : trackDesigns)
{
_items.push_back(td);
}