Fixed clang-tidy warnings
This commit is contained in:
@@ -22,7 +22,7 @@ enum class PathFinderType {
|
||||
class PathFinderBase {
|
||||
public:
|
||||
PathFinderBase(const Map *m);
|
||||
~PathFinderBase() = default;
|
||||
virtual ~PathFinderBase() = default;
|
||||
|
||||
PathFinderBase(const PathFinderBase &) = delete;
|
||||
PathFinderBase(PathFinderBase &&) = delete;
|
||||
@@ -36,7 +36,7 @@ protected:
|
||||
const Map *m_Map;
|
||||
};
|
||||
|
||||
class LinearPathFinder : public PathFinderBase {
|
||||
class LinearPathFinder final : public PathFinderBase {
|
||||
|
||||
public:
|
||||
LinearPathFinder(const Map *m) : PathFinderBase(m) {}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace pathfinder {
|
||||
|
||||
class BFS : public PathFinderBase {
|
||||
class BFS final : public PathFinderBase {
|
||||
|
||||
public:
|
||||
BFS(const Map *m) : PathFinderBase(m) {}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace pathfinder {
|
||||
|
||||
class Dijkstra : public PathFinderBase {
|
||||
class Dijkstra final : public PathFinderBase {
|
||||
|
||||
public:
|
||||
Dijkstra(const Map *m) : PathFinderBase(m) {}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace pathfinder {
|
||||
|
||||
class GBFS : public PathFinderBase {
|
||||
class GBFS final : public PathFinderBase {
|
||||
|
||||
public:
|
||||
GBFS(const Map *m) : PathFinderBase(m) {}
|
||||
|
||||
@@ -17,13 +17,13 @@ std::unique_ptr<PathFinderBase> create(PathFinderType type, const Map *map) {
|
||||
using namespace pathfinder;
|
||||
switch (type) {
|
||||
case PathFinderType::LINEAR:
|
||||
return std::move(std::make_unique<LinearPathFinder>(map));
|
||||
return std::make_unique<LinearPathFinder>(map);
|
||||
case PathFinderType::BFS:
|
||||
return std::move(std::make_unique<BFS>(map));
|
||||
return std::make_unique<BFS>(map);
|
||||
case PathFinderType::DIJKSTRA:
|
||||
return std::move(std::make_unique<Dijkstra>(map));
|
||||
return std::make_unique<Dijkstra>(map);
|
||||
case PathFinderType::GBFS:
|
||||
return std::move(std::make_unique<GBFS>(map));
|
||||
return std::make_unique<GBFS>(map);
|
||||
case PathFinderType::COUNT:
|
||||
LOG_WARNING("Incorrect pathfinder type");
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user