Cleanup / Wextra

Added -Wextra and fixed warnings that appeared

Converted olcPixelGameEngine to unix line endings because it was
annoying me
This commit is contained in:
Thomas Muller 2021-05-01 17:30:05 -04:00
parent 439051e52c
commit 3029d22fd8
Signed by: thomas
GPG key ID: AF006EB730564952
4 changed files with 5115 additions and 5106 deletions

View file

@ -4,7 +4,7 @@ project(main)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
include_directories(src) include_directories(src)
add_definitions(-g) add_definitions(-g)

View file

@ -20,6 +20,8 @@ bool App::OnUserCreate()
bool App::OnUserUpdate(float delta) bool App::OnUserUpdate(float delta)
{ {
(void)delta;
Vector2<int> screen = {ScreenWidth(), ScreenHeight()}; Vector2<int> screen = {ScreenWidth(), ScreenHeight()};
Vector2<int> mouse = {GetMouseX(), GetMouseY()}; Vector2<int> mouse = {GetMouseX(), GetMouseY()};

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@ class Vector2 {
public: public:
Vector2() = default; Vector2() = default;
Vector2(T x, T y) : m_x(x), m_y(y) {} Vector2(T x, T y) : m_x(x), m_y(y) {}
Vector2(const Vector2<T> &other) = default;
T x() { return m_x; } T x() { return m_x; }
T y() { return m_y; } T y() { return m_y; }