mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-01 01:38:14 +00:00
fxing CPPLINT config file and more norm
This commit is contained in:
+4
-5
@@ -15,11 +15,10 @@ filter=-runtime/indentation_namespace
|
||||
filter=-whitespace/ending_newline
|
||||
filter=-build/header_guard
|
||||
filter=-readability/todo
|
||||
filer=-whitespace/indent # due to public class rule
|
||||
#filter=-readability/function,-readability/streams,-readability/todo
|
||||
#filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn
|
||||
# TODO: this should be re-enabled.
|
||||
filter=-whitespace/comments
|
||||
filter=-whitespace/indent # due to public class rule
|
||||
|
||||
|
||||
exclude_files=cmake-build-debug/*
|
||||
exclude_files=build/*
|
||||
exclude_files=*/tests/*
|
||||
exclude_files=tests/*
|
||||
@@ -39,7 +39,7 @@ namespace RAY
|
||||
|
||||
//! @brief An image is assignable
|
||||
Image &operator=(const Image &image) = default;
|
||||
|
||||
|
||||
//! @brief Image destructor, will unload ressources
|
||||
~Image() override;
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Use 'ART_' as the cpp header guard prefix (e.g. #ifndef ART_PATH_TO_FILE_H_).
|
||||
root=.
|
||||
|
||||
exclude_files=tests/*
|
||||
@@ -2,6 +2,7 @@
|
||||
// Created by Zoe Roux on 2021-05-14.
|
||||
//
|
||||
|
||||
#include <string>
|
||||
#include "WalError.hpp"
|
||||
|
||||
namespace WAL
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace WAL
|
||||
{
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace WAL
|
||||
{
|
||||
@@ -16,13 +18,13 @@ namespace WAL
|
||||
private:
|
||||
int _nextID = 0;
|
||||
//! @brief The list of functions to call.
|
||||
std::unordered_map<int, std::function<void (Types...)>> _functions = {};
|
||||
std::unordered_map<int, std::function<void(Types...)>> _functions = {};
|
||||
|
||||
public:
|
||||
//! @brief Add a method to be called when this callback is invoked.
|
||||
//! @param callback The list of arguments of the callback method
|
||||
//! @return A unique ID for this callback. That can be used to remove the callback later.
|
||||
int addCallback(std::function<void (Types...)> callback)
|
||||
int addCallback(std::function<void(Types...)> callback)
|
||||
{
|
||||
int id = this->_nextID++;
|
||||
this->_functions[id] = std::move(callback);
|
||||
|
||||
@@ -157,11 +157,11 @@ namespace WAL
|
||||
typedef Vector3<float> Vector3f;
|
||||
typedef Vector3<unsigned> Vector3u;
|
||||
typedef Vector3<int> Vector3i;
|
||||
}
|
||||
} // namespace WAL
|
||||
|
||||
template<typename T>
|
||||
std::ostream &operator<<(std::ostream &s, const WAL::Vector3<T> &v)
|
||||
{
|
||||
s << "Vector3<" << typeid(T).name() << ">("<< v.x << ", " << v.y << ", " << v.z << ")";
|
||||
return s;
|
||||
} // namespace WAL
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#include "System.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace WAL
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
#include "Entity/Entity.hpp"
|
||||
|
||||
namespace WAL
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace WAL
|
||||
if (existing == this->_systems.end())
|
||||
throw NotFoundError("A system of the type \"" + std::string(type.name()) + "\" could not be found.");
|
||||
return *static_cast<T *>(existing->get());
|
||||
|
||||
}
|
||||
|
||||
//! @brief Remove a system using it's type.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <stdexcept>
|
||||
#include <Entity/Entity.hpp>
|
||||
#include "Entity/Entity.hpp"
|
||||
#include "Models/Callback.hpp"
|
||||
|
||||
using namespace WAL;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ int main()
|
||||
wal.run();
|
||||
return 0;
|
||||
} catch (const std::exception &ex) {
|
||||
std::cerr << ex.what() << std::endl;
|
||||
std::cerr << ex.what() << std::endl;
|
||||
return 84;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user