Commit fce326fd authored by hybrid's avatar hybrid

Constification patch by hendu

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4470 dfc29bdd-3216-0410-991c-e03cc46cb475
parent da59ee30
...@@ -80,7 +80,7 @@ namespace quake3 ...@@ -80,7 +80,7 @@ namespace quake3
typedef core::array< video::ITexture* > tTexArray; typedef core::array< video::ITexture* > tTexArray;
// string helper.. TODO: move to generic files // string helper.. TODO: move to generic files
inline s16 isEqual ( const core::stringc &string, u32 &pos, const c8 *list[], u16 listSize ) inline s16 isEqual ( const core::stringc &string, u32 &pos, const c8 * const list[], u16 listSize )
{ {
const char * in = string.c_str () + pos; const char * in = string.c_str () + pos;
...@@ -772,7 +772,7 @@ namespace quake3 ...@@ -772,7 +772,7 @@ namespace quake3
io::IFileSystem *fileSystem, io::IFileSystem *fileSystem,
video::IVideoDriver* driver) video::IVideoDriver* driver)
{ {
static const char* extension[] = static const char * const extension[] =
{ {
".jpg", ".jpg",
".jpeg", ".jpeg",
......
...@@ -17,7 +17,7 @@ namespace irr ...@@ -17,7 +17,7 @@ namespace irr
namespace gui namespace gui
{ {
#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ #ifdef _IRR_COMPILE_WITH_BMP_LOADER_
u8 BuiltInFontData[] = const u8 BuiltInFontData[] =
{ {
0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x28, 0x00,
...@@ -1055,15 +1055,15 @@ u8 BuiltInFontData[] = ...@@ -1055,15 +1055,15 @@ u8 BuiltInFontData[] =
0x23, 0x22 0x23, 0x22
}; };
u32 BuiltInFontDataSize = sizeof(BuiltInFontData); const u32 BuiltInFontDataSize = sizeof(BuiltInFontData);
#else // !defined(_IRR_COMPILE_WITH_BMP_LOADER_) #else // !defined(_IRR_COMPILE_WITH_BMP_LOADER_)
// built-in font cannot be loaded if there is no BMP loader // built-in font cannot be loaded if there is no BMP loader
u8* BuiltInFontData=0; const u8 * const BuiltInFontData=0;
u32 BuiltInFontDataSize = 0; const u32 BuiltInFontDataSize = 0;
#endif #endif
} // end namespace gui } // end namespace gui
......
...@@ -48,9 +48,9 @@ namespace irr ...@@ -48,9 +48,9 @@ namespace irr
namespace gui namespace gui
{ {
const wchar_t* IRR_XML_FORMAT_GUI_ENV = L"irr_gui"; const wchar_t IRR_XML_FORMAT_GUI_ENV[] = L"irr_gui";
const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT = L"element"; const wchar_t IRR_XML_FORMAT_GUI_ELEMENT[] = L"element";
const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE = L"type"; const wchar_t IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE[] = L"type";
const io::path CGUIEnvironment::DefaultFontName = "#DefaultFont"; const io::path CGUIEnvironment::DefaultFontName = "#DefaultFont";
...@@ -168,7 +168,8 @@ CGUIEnvironment::~CGUIEnvironment() ...@@ -168,7 +168,8 @@ CGUIEnvironment::~CGUIEnvironment()
void CGUIEnvironment::loadBuiltInFont() void CGUIEnvironment::loadBuiltInFont()
{ {
io::IReadFile* file = io::createMemoryReadFile(BuiltInFontData, BuiltInFontDataSize, DefaultFontName, false); io::IReadFile* file = io::createMemoryReadFile((void *) BuiltInFontData,
BuiltInFontDataSize, DefaultFontName, false);
CGUIFont* font = new CGUIFont(this, DefaultFontName ); CGUIFont* font = new CGUIFont(this, DefaultFontName );
if (!font->load(file)) if (!font->load(file))
......
...@@ -68,7 +68,7 @@ namespace ...@@ -68,7 +68,7 @@ namespace
namespace irr namespace irr
{ {
const char* wmDeleteWindow = "WM_DELETE_WINDOW"; const char wmDeleteWindow[] = "WM_DELETE_WINDOW";
//! constructor //! constructor
CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
......
...@@ -1102,7 +1102,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1102,7 +1102,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
const SVariable &v = group->Variable[g]; const SVariable &v = group->Variable[g];
// get the modifier // get the modifier
static const c8 * modifierList[] = static const c8 * const modifierList[] =
{ {
"tcmod","deformvertexes","rgbgen","tcgen","map","alphagen" "tcmod","deformvertexes","rgbgen","tcgen","map","alphagen"
}; };
...@@ -1124,7 +1124,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1124,7 +1124,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
} }
// get the modifier function // get the modifier function
static const c8 * funclist[] = static const c8 * const funclist[] =
{ {
"scroll","scale","rotate","stretch","turb", "scroll","scale","rotate","stretch","turb",
"wave","identity","vertex", "wave","identity","vertex",
...@@ -1133,7 +1133,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) ...@@ -1133,7 +1133,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture )
"exactvertex","const","lightingspecular","move","normal", "exactvertex","const","lightingspecular","move","normal",
"identitylighting" "identitylighting"
}; };
static const c8 * groupToken[] = { "(", ")" }; static const c8 * const groupToken[] = { "(", ")" };
pos = 0; pos = 0;
function.masterfunc1 = (eQ3ModifierFunction) isEqual( v.content, pos, funclist, 22 ); function.masterfunc1 = (eQ3ModifierFunction) isEqual( v.content, pos, funclist, 22 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment