Some const & visibility fixes
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12803 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e99b3dcc94
commit
1c48d76343
@ -29,7 +29,7 @@
|
||||
using namespace GUIEngine;
|
||||
|
||||
|
||||
const char* RACE_STATE_NAME = "race";
|
||||
static const char RACE_STATE_NAME[] = "race";
|
||||
|
||||
AbstractStateManager::AbstractStateManager()
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ using namespace irr::gui;
|
||||
# define round(x) (floor(x+0.5f))
|
||||
#endif
|
||||
|
||||
const char* RibbonWidget::NO_ITEM_ID = "?";
|
||||
const char RibbonWidget::NO_ITEM_ID[] = "?";
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -98,7 +98,7 @@ namespace GUIEngine
|
||||
* by the number of rows in the grid (mostly used by dynamic ribbon
|
||||
* widgets, but the base ribbon needs to know about filler items)
|
||||
*/
|
||||
static const char* NO_ITEM_ID;
|
||||
static const char NO_ITEM_ID[];
|
||||
|
||||
/** Contains which element within the ribbon is currently focused by
|
||||
* player 0 (used by the skin to show mouse hovers over items that
|
||||
|
@ -32,8 +32,8 @@
|
||||
|
||||
#define INPUT_MODE_DEBUG 0
|
||||
|
||||
const char* INPUT_FILE_NAME = "input.xml";
|
||||
const int INPUT_FILE_VERSION = 1;
|
||||
static const char INPUT_FILE_NAME[] = "input.xml";
|
||||
static const int INPUT_FILE_VERSION = 1;
|
||||
|
||||
DeviceManager::DeviceManager()
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ struct initAttachmentType {Attachment::AttachmentType attachment;
|
||||
increase (lower acceleration) it's sufficient negative.
|
||||
*/
|
||||
|
||||
initAttachmentType iat[]=
|
||||
static const initAttachmentType iat[]=
|
||||
{
|
||||
{Attachment::ATTACH_PARACHUTE, "parachute.b3d", "parachute-attach-icon.png"},
|
||||
{Attachment::ATTACH_BOMB, "bomb.b3d", "bomb-attach-icon.png" },
|
||||
|
@ -37,7 +37,7 @@ using namespace irr::video;
|
||||
|
||||
DEFINE_SCREEN_SINGLETON( ArenasScreen );
|
||||
|
||||
const char* ALL_ARENA_GROUPS_ID = "all";
|
||||
static const char ALL_ARENA_GROUPS_ID[] = "all";
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -55,11 +55,11 @@ InputDevice* player_1_device = NULL;
|
||||
using namespace GUIEngine;
|
||||
using irr::core::stringw;
|
||||
|
||||
const char* RANDOM_KART_ID = "randomkart";
|
||||
const char* ID_DONT_USE = "x";
|
||||
static const char RANDOM_KART_ID[] = "randomkart";
|
||||
static const char ID_DONT_USE[] = "x";
|
||||
// Use '/' as special character to avoid that someone creates
|
||||
// a kart called 'locked'
|
||||
const char* ID_LOCKED = "locked/";
|
||||
static const char ID_LOCKED[] = "locked/";
|
||||
|
||||
DEFINE_SCREEN_SINGLETON( KartSelectionScreen );
|
||||
|
||||
|
@ -37,7 +37,7 @@ using namespace GUIEngine;
|
||||
using namespace irr::core;
|
||||
using namespace irr::video;
|
||||
|
||||
const char* ALL_TRACK_GROUPS_ID = "all";
|
||||
static const char ALL_TRACK_GROUPS_ID[] = "all";
|
||||
|
||||
DEFINE_SCREEN_SINGLETON( TracksScreen );
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "utils/constants.hpp"
|
||||
|
||||
// for code that needs to know about endianness so do a simple test.
|
||||
// 0 : little endian
|
||||
// 1 : big endian
|
||||
@ -24,6 +26,6 @@ static const int endianness_test = 0x01000000;
|
||||
static const char* endianness_test_ptr = (const char*)&endianness_test;
|
||||
|
||||
// in little-endian, byte 0 will be 0. in big endian, byte 0 will be 1
|
||||
bool IS_LITTLE_ENDIAN = (endianness_test_ptr[0] == 0);
|
||||
const bool IS_LITTLE_ENDIAN = (endianness_test_ptr[0] == 0);
|
||||
|
||||
const char* STK_VERSION = "svn";
|
||||
const char STK_VERSION[] = "svn";
|
||||
|
@ -48,10 +48,10 @@
|
||||
|
||||
const int MAX_PLAYER_COUNT = 4;
|
||||
|
||||
extern bool IS_LITTLE_ENDIAN;
|
||||
extern const bool IS_LITTLE_ENDIAN;
|
||||
|
||||
#define DEFAULT_GROUP_NAME "standard"
|
||||
|
||||
extern const char* STK_VERSION;
|
||||
extern const char STK_VERSION[];
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user