From 1714c5d7329350e87d499fb05732cb72ab821f4d Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Fri, 1 Dec 2017 00:01:51 +0100 Subject: [PATCH] Fixed a codacy issue --- .gitignore | 1 + README.md | 2 ++ src/main.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7f03d36..a7b383e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /build/ /tags +*.swp diff --git a/README.md b/README.md index 384ec75..f9f4f61 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fc02d56fa7194e61b2c7d260fd2e4186)](https://www.codacy.com/app/LiquidityC/breakhack?utm_source=github.com&utm_medium=referral&utm_content=LiquidityC/breakhack&utm_campaign=Badge_Grade) + Something in the ways of NETHACK ================================ diff --git a/src/main.c b/src/main.c index cfef707..b49186f 100644 --- a/src/main.c +++ b/src/main.c @@ -94,11 +94,10 @@ void run() { SDL_Event event; bool quit = false; - int ticks; while (!quit) { - ticks = SDL_GetTicks(); + int ticks = SDL_GetTicks(); while (SDL_PollEvent(&event) != 0) { if (event.type == SDL_QUIT)