summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-05-20 19:56:43 +0200
committerAki <please@ignore.pl>2022-05-20 19:58:21 +0200
commit650d81b8d185ae54e456b5159c3b94e0df94e252 (patch)
treeb392cd12fc4cd3ce33ff9bc5bf27c24c0e675ba0
parentd3720f01837e949ce7e7ea9b119358a5bb7b9666 (diff)
downloadderelict-650d81b8d185ae54e456b5159c3b94e0df94e252.zip
derelict-650d81b8d185ae54e456b5159c3b94e0df94e252.tar.gz
derelict-650d81b8d185ae54e456b5159c3b94e0df94e252.tar.bz2
Enabled warnings during compilation
-rw-r--r--CMakeLists.txt4
-rw-r--r--View.cpp2
-rw-r--r--View.h2
-rw-r--r--main.cpp2
4 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30ff0fe..e300660 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,3 +17,7 @@ target_link_libraries(
raylib
nlohmann_json::nlohmann_json
)
+target_compile_options(
+ ${PROJECT_NAME}
+ PRIVATE -Wall -Wextra -Wpedantic
+)
diff --git a/View.cpp b/View.cpp
index 93ad894..719456e 100644
--- a/View.cpp
+++ b/View.cpp
@@ -33,7 +33,7 @@ View::~View()
void
-View::update(const float dt)
+View::update(const float)
{
if (IsKeyPressed(KEY_SPACE)) {
m_grid++;
diff --git a/View.h b/View.h
index e58b539..e700bb0 100644
--- a/View.h
+++ b/View.h
@@ -19,7 +19,7 @@ private:
Camera m_camera;
std::vector<Grid> m_grids;
std::vector<Label> m_labels;
- int m_grid;
+ unsigned int m_grid;
float m_timer;
Texture2D m_texture;
Label* m_active;
diff --git a/main.cpp b/main.cpp
index 2116582..96f5e23 100644
--- a/main.cpp
+++ b/main.cpp
@@ -8,7 +8,7 @@
int
-main(int argc, char* argv[])
+main(int, char*[])
{
InitWindow(800, 600, "Derelict");
{