API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.
C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter. We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well. As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h Including that allows to continue using old defines for a while - or make it easier to have code which compiles with old and new Irrlicht library versions. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -47,7 +47,7 @@ irr::video::ITexture* CMeshTextureLoader::getTexture(const irr::io::path& textur
|
||||
|
||||
// Pre-process texture filename.
|
||||
irr::io::path simplifiedTexName(textureName);
|
||||
simplifiedTexName.replace(_IRR_TEXT('\\'),_IRR_TEXT('/'));
|
||||
simplifiedTexName.replace(IRR_TEXT('\\'),IRR_TEXT('/'));
|
||||
|
||||
// user defined texture path
|
||||
if ( !TexturePath.empty() )
|
||||
@@ -103,7 +103,7 @@ irr::video::ITexture* CMeshTextureLoader::getTexture(const irr::io::path& textur
|
||||
if ( checkTextureName(FileSystem->getFileBasename(simplifiedTexName)) )
|
||||
return VideoDriver->getTexture(TextureName);
|
||||
|
||||
TextureName = _IRR_TEXT("");
|
||||
TextureName = IRR_TEXT("");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void CMeshTextureLoader::setMeshFile(const irr::io::IReadFile* meshFile)
|
||||
{
|
||||
// no grab (would need a weak_ptr)
|
||||
MeshFile = meshFile;
|
||||
MeshPath = _IRR_TEXT(""); // do a lazy evaluation later
|
||||
MeshPath = IRR_TEXT(""); // do a lazy evaluation later
|
||||
}
|
||||
|
||||
//! Meshloaders will try to look relative to the path of the materialFile
|
||||
@@ -120,7 +120,7 @@ void CMeshTextureLoader::setMaterialFile(const irr::io::IReadFile* materialFile)
|
||||
{
|
||||
// no grab (would need a weak_ptr)
|
||||
MaterialFile = materialFile;
|
||||
MaterialPath = _IRR_TEXT(""); // do a lazy evaluation later
|
||||
MaterialPath = IRR_TEXT(""); // do a lazy evaluation later
|
||||
}
|
||||
|
||||
} // end namespace scnene
|
||||
|
Reference in New Issue
Block a user