Commit 9fbd2926 authored by hybrid's avatar hybrid

Reduce some more calls to the named path conversions.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3024 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ab5bf465
......@@ -784,7 +784,7 @@ void CAnimatedMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAtt
{
IAnimatedMeshSceneNode::deserializeAttributes(in, options);
io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh).getPath();
io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh);
io::path newMeshStr = in->getAttributeAsString("Mesh");
Looping = in->getAttributeAsBool("Looping");
......
......@@ -1828,13 +1828,13 @@ public:
virtual core::stringw getStringW()
{
return core::stringw(Value ? Value->getName().getPath().c_str() : 0);
return Value ? Value->getName() : core::stringw(0);
}
virtual core::stringc getString()
{
// since texture names can be stringw we are careful with the types
return core::stringc(Value ? Value->getName().getPath().c_str() : 0);
return Value ? Value->getName() : core::stringc(0);
}
virtual void setString(const char* text)
......
......@@ -1375,7 +1375,7 @@ IGUIFont* CGUIEnvironment::getFont(const io::path& filename)
else if (t==EGFT_VECTOR)
{
// todo: vector fonts
os::Printer::log("Unable to load font, XML vector fonts are not supported yet", f.NamedPath.getPath().c_str(), ELL_ERROR);
os::Printer::log("Unable to load font, XML vector fonts are not supported yet", f.NamedPath, ELL_ERROR);
//CGUIFontVector* font = new CGUIFontVector(Driver);
//ifont = (IGUIFont*)font;
......
......@@ -325,7 +325,7 @@ void CMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeRea
//! Reads attributes of the scene node.
void CMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{
io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh).getPath();
io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh);
io::path newMeshStr = in->getAttributeAsString("Mesh");
ReadOnlyMaterials = in->getAttributeAsBool("ReadOnlyMaterials");
......
......@@ -64,7 +64,7 @@ bool COBJMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla
// write OBJ MESH header
const core::stringc name(FileSystem->getFileBasename(SceneManager->getMeshCache()->getMeshName(mesh).getPath(), false)+".mtl");
const core::stringc name(FileSystem->getFileBasename(SceneManager->getMeshCache()->getMeshName(mesh), false)+".mtl");
file->write("# exported by Irrlicht\n",23);
file->write("mtllib ",7);
file->write(name.c_str(),name.size());
......
......@@ -284,7 +284,7 @@ bool COctTreeSceneNode::createTree(IMesh* mesh)
if (!mesh)
return false;
MeshName = SceneManager->getMeshCache()->getMeshName( mesh ).getPath();
MeshName = SceneManager->getMeshCache()->getMeshName(mesh);
mesh->grab();
deleteTree();
......
......@@ -66,7 +66,7 @@ bool CSTLMeshWriter::writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s
// write STL MESH header
file->write("binary ",7);
const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh).getPath());
const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh));
const s32 sizeleft = 73-name.size(); // 80 byte header
if (sizeleft<0)
file->write(name.c_str(),73);
......@@ -115,7 +115,7 @@ bool CSTLMeshWriter::writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s3
// write STL MESH header
file->write("solid ",6);
const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh).getPath());
const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh));
file->write(name.c_str(),name.size());
file->write("\n\n",2);
......
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