Fix clang screen.hpp warning

This commit is contained in:
Benau 2018-03-23 20:20:09 +08:00
parent 3ee3d8d5bd
commit 1e2cb2dc4a
45 changed files with 2 additions and 93 deletions

View File

@ -48,14 +48,9 @@ using namespace irr;
*/
namespace GUIEngine
{
#define DEFINE_SCREEN_SINGLETON( ClassName ) \
template<> ClassName* GUIEngine::ScreenSingleton< ClassName >::singleton = NULL
/**
* \brief Declares a class to be a singleton.
* Normally, all screens will be singletons.
* Note that you need to use the 'DEFINE_SCREEN_SINGLETON' macro in a .
* cpp file to actually define the instance (as this can't be done in a .h)
* \ingroup guiengine
*/
template<typename SCREEN>
@ -83,6 +78,8 @@ namespace GUIEngine
}
};
template <typename SCREEN> SCREEN*
ScreenSingleton<SCREEN>::singleton = nullptr;
/**
* \brief Represents a single GUI screen.

View File

@ -35,8 +35,6 @@
#include <iostream>
DEFINE_SCREEN_SINGLETON( AddonsScreen );
using namespace Online;
// ----------------------------------------------------------------------------

View File

@ -37,8 +37,6 @@ using namespace GUIEngine;
using namespace irr::core;
using namespace irr::video;
DEFINE_SCREEN_SINGLETON( ArenasScreen );
static const char ALL_ARENA_GROUPS_ID[] = "all";

View File

@ -43,8 +43,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( CreateServerScreen );
// ----------------------------------------------------------------------------
CreateServerScreen::CreateServerScreen() : Screen("online/create_server.stkgui")

View File

@ -33,8 +33,6 @@ using irr::core::stringc;
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
DEFINE_SCREEN_SINGLETON( CreditsScreen );
using namespace GUIEngine;
const float TIME_SECTION_FADE = 0.8f;
const float ENTRIES_FADE_TIME = 0.3f;

View File

@ -39,8 +39,6 @@ using namespace irr::video;
static const char ALL_TRACK_GROUPS_ID[] = "all";
DEFINE_SCREEN_SINGLETON( EasterEggScreen );
// -----------------------------------------------------------------------------
EasterEggScreen::EasterEggScreen() : Screen("easter_egg.stkgui")

View File

@ -32,8 +32,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( EditGPScreen );
// -----------------------------------------------------------------------------
EditGPScreen::EditGPScreen() : Screen("edit_gp.stkgui"), m_gp(NULL),
m_list(NULL), m_icon_bank(NULL),

View File

@ -33,8 +33,6 @@ using namespace irr::core;
const char* EditTrackScreen::ALL_TRACKS_GROUP_ID = "all";
DEFINE_SCREEN_SINGLETON( EditTrackScreen );
// -----------------------------------------------------------------------------
EditTrackScreen::EditTrackScreen()
: Screen("edit_track.stkgui"), m_track_group(ALL_TRACKS_GROUP_ID),

View File

@ -62,8 +62,6 @@ const float ANIM_TO = 7.0f;
const int GIFT_EXIT_FROM = (int)ANIM_TO;
const int GIFT_EXIT_TO = GIFT_EXIT_FROM + 7;
DEFINE_SCREEN_SINGLETON( FeatureUnlockedCutScene );
// ============================================================================
#if 0

View File

@ -27,8 +27,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( GhostReplaySelection );
// ----------------------------------------------------------------------------
/** Constructor, which loads the stkgui file.
*/

View File

@ -48,8 +48,6 @@
using irr::gui::IGUIStaticText;
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( GPInfoScreen );
/** Constructor, initialised some variables which might be used before
* loadedFromFile is called.
*/

View File

@ -36,9 +36,6 @@
using namespace GUIEngine;
using namespace irr::core;
DEFINE_SCREEN_SINGLETON( GrandPrixEditorScreen );
// -----------------------------------------------------------------------------
GrandPrixEditorScreen::GrandPrixEditorScreen()
: Screen("grand_prix_editor.stkgui"), m_selection(NULL),

View File

@ -69,8 +69,6 @@ const float KART_Z = 0.0f;
const int MAX_KART_COUNT = 4;
DEFINE_SCREEN_SINGLETON( GrandPrixLose );
// -------------------------------------------------------------------------------------
void GrandPrixLose::onCutsceneEnd()

View File

@ -106,8 +106,6 @@ const float PODIUMS_FINAL_Y[3] = {
const float PODIUMS_AND_KARTS_SPEED_Y[3] = { 0.9f, 1.35f, 0.45f };
DEFINE_SCREEN_SINGLETON( GrandPrixWin );
// -------------------------------------------------------------------------------------
GrandPrixWin::GrandPrixWin() : GrandPrixCutscene("grand_prix_win.stkgui")

View File

@ -36,8 +36,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( HelpScreen1 );
// -----------------------------------------------------------------------------
HelpScreen1::HelpScreen1() : Screen("help1.stkgui")

View File

@ -27,8 +27,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( HelpScreen2 );
// -----------------------------------------------------------------------------
HelpScreen2::HelpScreen2() : Screen("help2.stkgui")

View File

@ -28,8 +28,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( HelpScreen3 );
// -----------------------------------------------------------------------------
HelpScreen3::HelpScreen3() : Screen("help3.stkgui")

View File

@ -28,8 +28,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( HelpScreen4 );
// -----------------------------------------------------------------------------
HelpScreen4::HelpScreen4() : Screen("help4.stkgui")

View File

@ -27,8 +27,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( HelpScreen5 );
// -----------------------------------------------------------------------------
HelpScreen5::HelpScreen5() : Screen("help5.stkgui")

View File

@ -56,7 +56,6 @@ static const char ID_DONT_USE[] = "x";
// a kart called 'locked'
static const char ID_LOCKED[] = "locked/";
//DEFINE_SCREEN_SINGLETON( KartSelectionScreen );
KartSelectionScreen* KartSelectionScreen::m_instance_ptr = NULL;
int g_root_id;

View File

@ -68,8 +68,6 @@
using namespace GUIEngine;
using namespace Online;
DEFINE_SCREEN_SINGLETON( MainMenuScreen );
bool MainMenuScreen::m_enable_online = false;
// ----------------------------------------------------------------------------

View File

@ -27,8 +27,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( NetworkKartSelectionScreen );
// ----------------------------------------------------------------------------
void NetworkKartSelectionScreen::init()
{

View File

@ -46,8 +46,6 @@
using namespace Online;
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( NetworkingLobby );
/** This is the lobby screen that is shown on all clients, but not on the
* server. It shows currently connected clients, and allows the 'master'
* client (i.e. the stk instance that created the server) to control the

View File

@ -17,8 +17,6 @@
#include "states_screens/offline_kart_selection.hpp"
DEFINE_SCREEN_SINGLETON( OfflineKartSelectionScreen );
OfflineKartSelectionScreen::OfflineKartSelectionScreen() : KartSelectionScreen("karts.stkgui")
{
}

View File

@ -45,8 +45,6 @@ using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineLanScreen );
// -----------------------------------------------------------------------------
OnlineLanScreen::OnlineLanScreen() : GUIEngine::Screen("online/lan.stkgui")

View File

@ -40,9 +40,6 @@ using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineProfileAchievements );
DEFINE_SCREEN_SINGLETON( TabOnlineProfileAchievements );
// -----------------------------------------------------------------------------
/** Constructor.
*/

View File

@ -33,8 +33,6 @@ using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineProfileFriends );
int OnlineProfileFriends::m_sort_column = 0;
bool OnlineProfileFriends::m_sort_increasing = true;

View File

@ -41,8 +41,6 @@ using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineProfileServers );
// -----------------------------------------------------------------------------
OnlineProfileServers::OnlineProfileServers() : GUIEngine::Screen("online/profile_servers.stkgui")

View File

@ -35,8 +35,6 @@ using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineProfileSettings );
// -----------------------------------------------------------------------------
OnlineProfileSettings::OnlineProfileSettings() : OnlineProfileBase("online/profile_settings.stkgui")

View File

@ -42,8 +42,6 @@
using namespace GUIEngine;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineScreen );
// ----------------------------------------------------------------------------
OnlineScreen::OnlineScreen() : Screen("online/online.stkgui")

View File

@ -32,8 +32,6 @@ using namespace Online;
#include <assert.h>
#include <iostream>
DEFINE_SCREEN_SINGLETON( OnlineUserSearch );
// ----------------------------------------------------------------------------
OnlineUserSearch::OnlineUserSearch() : Screen("online/user_search.stkgui")

View File

@ -39,8 +39,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( OptionsScreenAudio );
// -----------------------------------------------------------------------------
OptionsScreenAudio::OptionsScreenAudio() : Screen("options_audio.stkgui")

View File

@ -45,8 +45,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( OptionsScreenDevice );
// ----------------------------------------------------------------------------
OptionsScreenDevice::OptionsScreenDevice() : Screen("options_device.stkgui")

View File

@ -46,8 +46,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( OptionsScreenInput );
// -----------------------------------------------------------------------------
OptionsScreenInput::OptionsScreenInput() : Screen("options_input.stkgui")

View File

@ -54,8 +54,6 @@
using namespace GUIEngine;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OptionsScreenUI );
// -----------------------------------------------------------------------------
OptionsScreenUI::OptionsScreenUI() : Screen("options_ui.stkgui")

View File

@ -43,8 +43,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( OptionsScreenVideo );
// ----------------------------------------------------------------------------
void OptionsScreenVideo::initPresets()
{

View File

@ -60,8 +60,6 @@
#include "utils/string_utils.hpp"
#include <algorithm>
DEFINE_SCREEN_SINGLETON(RaceResultGUI);
/** Constructor, initialises internal data structures.
*/
RaceResultGUI::RaceResultGUI() : Screen("race_result.stkgui",

View File

@ -43,7 +43,6 @@ const int CONFIG_CODE_SOCCER = 5;
const int CONFIG_CODE_GHOST = 6;
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( RaceSetupScreen );
// -----------------------------------------------------------------------------

View File

@ -38,8 +38,6 @@ using namespace Online;
using namespace irr;
using namespace core;
DEFINE_SCREEN_SINGLETON( RegisterScreen );
// -----------------------------------------------------------------------------
RegisterScreen::RegisterScreen() : Screen("online/register.stkgui")

View File

@ -36,8 +36,6 @@
using namespace Online;
DEFINE_SCREEN_SINGLETON( ServerSelection );
// ----------------------------------------------------------------------------
/** Constructor, which loads the stkgui file.
*/

View File

@ -37,7 +37,6 @@
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( SoccerSetupScreen );
#define KART_CONTINUOUS_ROTATION_SPEED 35.f
#define KART_CONFIRMATION_ROTATION_SPEED 4.f

View File

@ -52,8 +52,6 @@ using namespace irr::video;
using namespace irr::core;
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( TrackInfoScreen );
// ----------------------------------------------------------------------------
/** Constructor, which loads the corresponding track_info.stkgui file. */
TrackInfoScreen::TrackInfoScreen()

View File

@ -42,8 +42,6 @@ using namespace irr::video;
static const char ALL_TRACK_GROUPS_ID[] = "all";
DEFINE_SCREEN_SINGLETON( TracksAndGPScreen );
// -----------------------------------------------------------------------------
void TracksAndGPScreen::eventCallback(Widget* widget, const std::string& name,

View File

@ -46,8 +46,6 @@ using namespace irr::video;
static const char ALL_TRACK_GROUPS_ID[] = "all";
DEFINE_SCREEN_SINGLETON( TracksScreen );
// -----------------------------------------------------------------------------
void TracksScreen::eventCallback(Widget* widget, const std::string& name,

View File

@ -40,9 +40,6 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( UserScreen );
DEFINE_SCREEN_SINGLETON( TabbedUserScreen );
// ----------------------------------------------------------------------------
BaseUserScreen::BaseUserScreen(const std::string &name) : Screen(name.c_str())