Commit 6e3bc81a authored by hybrid's avatar hybrid

Add implicit casts operators for the most common name. This allows simpler...

Add implicit casts operators for the most common name. This allows simpler usage of the NamedPath struct. Hopefully also a correct one.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3010 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 59721e0d
......@@ -69,6 +69,17 @@ struct SNamedPath
return Name;
}
//! Implicit cast to io::path
operator core::stringc() const
{
return core::stringc(getSerializationName());
}
//! Implicit cast to io::path
operator core::stringw() const
{
return core::stringw(getSerializationName());
}
//! Returns the string which should be used in serialization.
const path& getSerializationName() const
{
......
......@@ -115,7 +115,7 @@ void CGUITextureCacheBrowser::updateImageList()
core::stringw details;
video::ITexture* tex = Driver->getTextureByIndex(i);
details = L"File name: ";
details += tex->getName().c_str();
details += tex->getName();
details += L"\nFormat: ";
video::ECOLOR_FORMAT cf = tex->getColorFormat();
......
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