mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 21:28:28 +00:00
Silence many clang warnings [-Wmissing-variable-declarations]
warning: no previous extern declaration for non-static variable ...
This commit is contained in:
parent
4d1c148540
commit
2d1e234fcc
@ -53,7 +53,7 @@ public:
|
||||
bool was_an_attribute_;
|
||||
};
|
||||
|
||||
std::vector<well_known_aspect> well_known_aspects;
|
||||
static std::vector<well_known_aspect> well_known_aspects;
|
||||
|
||||
void configuration::init(const config &game_config)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ static std::vector<std::string> saved_windows_;
|
||||
|
||||
namespace editor {
|
||||
|
||||
map_labels* current_labels;
|
||||
static map_labels* current_labels;
|
||||
|
||||
map_labels* get_current_labels() {
|
||||
return current_labels;
|
||||
|
@ -64,9 +64,6 @@ namespace game_config
|
||||
|
||||
int cache_compression_level = 6;
|
||||
|
||||
int title_logo_x = 0, title_logo_y = 0, title_buttons_x = 0, title_buttons_y = 0, title_buttons_padding = 0,
|
||||
title_tip_x = 0, title_tip_width = 0, title_tip_padding = 0;
|
||||
|
||||
std::string title_music,
|
||||
lobby_music,
|
||||
default_victory_music,
|
||||
@ -123,8 +120,8 @@ namespace game_config
|
||||
std::vector<Uint32> red_green_scale;
|
||||
std::vector<Uint32> red_green_scale_text;
|
||||
|
||||
std::vector<Uint32> blue_white_scale;
|
||||
std::vector<Uint32> blue_white_scale_text;
|
||||
static std::vector<Uint32> blue_white_scale;
|
||||
static std::vector<Uint32> blue_white_scale_text;
|
||||
|
||||
double hp_bar_scaling = 0.666;
|
||||
double xp_bar_scaling = 0.5;
|
||||
|
@ -63,7 +63,7 @@ std::string sound_slider_adjust = "";
|
||||
|
||||
t_string has_helptip_message;
|
||||
|
||||
std::vector<ttip> tips;
|
||||
static std::vector<ttip> tips;
|
||||
|
||||
std::vector<ttip> get_tips()
|
||||
{
|
||||
@ -457,13 +457,13 @@ void tgui_definition::load_widget_definitions(
|
||||
}
|
||||
|
||||
/** Map with all known windows, (the builder class builds a window). */
|
||||
std::map<std::string, twindow_builder> windows;
|
||||
static std::map<std::string, twindow_builder> windows;
|
||||
|
||||
/** Map with all known guis. */
|
||||
std::map<std::string, tgui_definition> guis;
|
||||
static std::map<std::string, tgui_definition> guis;
|
||||
|
||||
/** Points to the current gui. */
|
||||
std::map<std::string, tgui_definition>::const_iterator current_gui = guis.end();
|
||||
static std::map<std::string, tgui_definition>::const_iterator current_gui = guis.end();
|
||||
|
||||
void register_window(const std::string& id)
|
||||
{
|
||||
|
@ -641,7 +641,7 @@ manager::~manager()
|
||||
flush_cache();
|
||||
}
|
||||
|
||||
SDL_PixelFormat last_pixel_format;
|
||||
static SDL_PixelFormat last_pixel_format;
|
||||
|
||||
void set_pixel_format(SDL_PixelFormat* format)
|
||||
{
|
||||
|
@ -957,8 +957,8 @@ struct bandwidth_stats {
|
||||
};
|
||||
typedef std::map<const std::string, bandwidth_stats> bandwidth_map;
|
||||
typedef std::vector<bandwidth_map> hour_stats_vector;
|
||||
hour_stats_vector hour_stats(24);
|
||||
|
||||
static hour_stats_vector hour_stats(24);
|
||||
|
||||
|
||||
static bandwidth_map::iterator add_bandwidth_entry(const std::string& packet_type)
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
namespace preferences {
|
||||
|
||||
display* disp = NULL;
|
||||
static display* disp = NULL;
|
||||
|
||||
display_manager::display_manager(display* d)
|
||||
{
|
||||
|
@ -386,7 +386,7 @@ void replay::remove_command(int index)
|
||||
}
|
||||
|
||||
// cached message log
|
||||
std::vector< chat_msg > message_log;
|
||||
static std::vector< chat_msg > message_log;
|
||||
|
||||
|
||||
const std::vector<chat_msg>& replay::build_chat_log()
|
||||
|
@ -126,7 +126,7 @@ static lg::log_domain log_config("config");
|
||||
#endif
|
||||
/** @todo FIXME: should define SIGINT here too, but to what? */
|
||||
|
||||
sig_atomic_t config_reload = 0;
|
||||
static sig_atomic_t config_reload = 0;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
static void reload_config(int signal) {
|
||||
|
@ -37,11 +37,11 @@ static lg::log_domain log_audio("audio");
|
||||
|
||||
namespace sound {
|
||||
// Channel-chunk mapping lets us know, if we can safely free a given chunk
|
||||
std::vector<Mix_Chunk*> channel_chunks;
|
||||
static std::vector<Mix_Chunk*> channel_chunks;
|
||||
|
||||
// Channel-id mapping for use with sound sources (to check if given source
|
||||
// is playing on a channel for fading/panning)
|
||||
std::vector<int> channel_ids;
|
||||
static std::vector<int> channel_ids;
|
||||
|
||||
static void play_sound_internal(const std::string& files, channel_group group, unsigned int repeats=0,
|
||||
unsigned int distance=0, int id=-1, int loop_ticks=0, int fadein_ticks=0);
|
||||
|
@ -24,7 +24,7 @@ static lg::log_domain log_replay("replay");
|
||||
#define WRN_REPLAY LOG_STREAM(warn, log_replay)
|
||||
#define ERR_REPLAY LOG_STREAM(err, log_replay)
|
||||
|
||||
ignored_checkup default_instnce;
|
||||
static ignored_checkup default_instnce;
|
||||
|
||||
checkup* checkup_instance = &default_instnce;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user