Move definition of UNUSED to wassert.hpp to avoid entanglements with autotools.

This commit is contained in:
Eric S. Raymond 2007-06-08 21:14:33 +00:00
parent 8fb016cbe9
commit 2a2b66bc4f
8 changed files with 10 additions and 6 deletions

View file

@ -40,7 +40,6 @@
#include "widgets/progressbar.hpp"
#include "widgets/textbox.hpp"
#include "wassert.hpp"
#include "config.h" // For UNUSED
#include "sdl_ttf/SDL_ttf.h"

View file

@ -16,7 +16,7 @@
#include "font.hpp"
#include "preferences.hpp"
#include "config.h" // For UNUSED
#include "wassert.hpp"
namespace gui{
floating_textbox::floating_textbox() : box_(NULL), check_(NULL), mode_(TEXTBOX_NONE), label_(0)

View file

@ -30,6 +30,7 @@
#include "wesconfig.h"
#include "wml_separators.hpp"
#include "SDL.h"
#include "wassert.hpp"
#include <algorithm>
#include <cstdlib>

View file

@ -26,7 +26,7 @@
#include "video.hpp"
#include "replay.hpp"
#include "wml_separators.hpp"
#include "config.h" // for UNUSED
#include "wassert.hpp"
#define LOG_NG lg::info(lg::engine)
#define LOG_NW LOG_STREAM(info, network)

View file

@ -20,7 +20,6 @@ See the COPYING file for more details.
#include "pathfind.hpp"
#include "util.hpp"
#include "wassert.hpp"
#include "config.h" // For UNUSED
class gamestatus;

View file

@ -23,7 +23,6 @@
#include "sound.hpp"
#include "variable.hpp"
#include "wassert.hpp"
#include "config.h" // For UNUSED
#define LOG_NG LOG_STREAM(info, engine)

View file

@ -38,7 +38,6 @@
#include "widgets/progressbar.hpp"
#include "widgets/textbox.hpp"
#include "wassert.hpp"
#include "config.h" // For UNUSED
#include "sdl_ttf/SDL_ttf.h"

View file

@ -16,4 +16,11 @@
#include <cassert>
#define wassert assert
/* Macro for declaring function arguments unused. */
#if defined(__GNUC__)
# define UNUSED __attribute__((unused)) /* Flag variable as unused */
#else /* not __GNUC__ */
# define UNUSED
#endif
#endif