Commit dcde0eae authored by hybrid's avatar hybrid

Fixed some unpleasant code fragments.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1022 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 57ddd994
......@@ -18,6 +18,8 @@ namespace scene
namespace quake3
{
static const core::stringc irrEmptyStringc("");
//! Hold the different Mesh Types used for getMesh
enum eQ3MeshIndex
{
......@@ -44,8 +46,8 @@ namespace quake3
void clear ()
{
name = core::irrEmtpyStringc;
content = core::irrEmtpyStringc;
name = "";
content = "";
}
s32 isValid () const
......@@ -409,7 +411,7 @@ namespace quake3
{
s32 index = getIndex ( name );
if ( index < 0 )
return core::irrEmtpyStringc;
return irrEmptyStringc;
return Variable [ index ].content;
}
......
......@@ -18,8 +18,6 @@ namespace core
// ----------- some basic quite often used string functions -----------------
static const stringc irrEmtpyStringc = "";
//! cut the filename extension from a string
inline stringc& cutFilenameExtension ( stringc &dest, const stringc &source )
{
......
......@@ -96,7 +96,8 @@ bool CSTLMeshWriter::writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s
const u16 attributes = 0;
for (u32 j=0; j<indexCount; j+=3)
{
file->write(&core::plane3df(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos).Normal, 12);
const core::plane3df tmpplane(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos);
file->write(&tmpplane.Normal, 12);
file->write(&vtx[buffer->getIndices()[j]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+1]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+2]].Pos, 12);
......@@ -110,7 +111,8 @@ bool CSTLMeshWriter::writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s
const u16 attributes = 0;
for (u32 j=0; j<indexCount; j+=3)
{
file->write(&core::plane3df(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos).Normal, 12);
const core::plane3df tmpplane(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos);
file->write(&tmpplane.Normal, 12);
file->write(&vtx[buffer->getIndices()[j]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+1]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+2]].Pos, 12);
......@@ -124,7 +126,8 @@ bool CSTLMeshWriter::writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s
const u16 attributes = 0;
for (u32 j=0; j<indexCount; j+=3)
{
file->write(&core::plane3df(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos).Normal, 12);
const core::plane3df tmpplane(vtx[buffer->getIndices()[j]].Pos,vtx[buffer->getIndices()[j+1]].Pos,vtx[buffer->getIndices()[j+2]].Pos);
file->write(&tmpplane.Normal, 12);
file->write(&vtx[buffer->getIndices()[j]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+1]].Pos, 12);
file->write(&vtx[buffer->getIndices()[j+2]].Pos, 12);
......
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