From 487fc31578d1fa8d0d2b11fdb59aaca074bce6e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Wed, 14 Dec 2016 21:28:00 +0700 Subject: [PATCH] Removed useless STUBBED define --- Source/Game.hpp | 7 ------- Source/Utils/ImageIO.cpp | 18 +++++++++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Source/Game.hpp b/Source/Game.hpp index 596ade4..2a0f874 100644 --- a/Source/Game.hpp +++ b/Source/Game.hpp @@ -183,13 +183,6 @@ static __forceinline void swap_gl_buffers(void) frameticks = now; } -extern "C" { - void UndefinedSymbolToExposeStubbedCode(void); -} -//#define STUBBED(x) UndefinedSymbolToExposeStubbedCode(); -#define STUBBED(x) { static bool seen = false; if (!seen) { seen = true; fprintf(stderr, "STUBBED: %s at %s:%d\n", x, __FILE__, __LINE__); } } -//#define STUBBED(x) - enum maptypes { mapkilleveryone, mapgosomewhere, mapkillsomeone, mapkillmost // These two are unused diff --git a/Source/Utils/ImageIO.cpp b/Source/Utils/ImageIO.cpp index 778492c..8bd5bfc 100644 --- a/Source/Utils/ImageIO.cpp +++ b/Source/Utils/ImageIO.cpp @@ -51,21 +51,24 @@ ImageRec::~ImageRec() bool load_image(const char *file_name, ImageRec &tex) { - if (visibleloading) + if (visibleloading) { Game::LoadingScreen(); + } - if ( tex.data == NULL ) + if ( tex.data == NULL ) { return false; + } const char *ptr = strrchr((char *)file_name, '.'); if (ptr) { - if (strcasecmp(ptr + 1, "png") == 0) + if (strcasecmp(ptr + 1, "png") == 0) { return load_png(file_name, tex); - else if (strcasecmp(ptr + 1, "jpg") == 0) + } else if (strcasecmp(ptr + 1, "jpg") == 0) { return load_jpg(file_name, tex); + } } - STUBBED("Unsupported image type"); + std::cerr << "Unsupported image type" << std::endl; return false; } @@ -73,11 +76,12 @@ bool save_screenshot(const char *file_name) { const char *ptr = strrchr((char *)file_name, '.'); if (ptr) { - if (strcasecmp(ptr + 1, "png") == 0) + if (strcasecmp(ptr + 1, "png") == 0) { return save_screenshot_png((Folders::getScreenshotDir() + '/' + file_name).c_str()); + } } - STUBBED("Unsupported image type"); + std::cerr << "Unsupported image type" << std::endl; return false; } -- 2.39.5