Reduce needless use of wchar / stringw

This commit is contained in:
sfan5
2024-02-18 16:29:03 +01:00
parent 2894d9ab03
commit 19819bd23a
16 changed files with 34 additions and 104 deletions

View File

@ -73,27 +73,6 @@ public:
filtered with these levels. If you want to be a text displayed,
independent on what level filter is set, use ELL_NONE. */
virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
//! Prints out a text into the log
/** \param text: Text to print out.
\param hint: Additional info. This string is added after a " :" to the
string.
\param ll: Log level of the text. If the text is an error, set
it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
is just an informational text, set it to ELL_INFORMATION. Texts are
filtered with these levels. If you want to be a text displayed,
independent on what level filter is set, use ELL_NONE. */
virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
//! Prints out a text into the log
/** \param text: Text to print out.
\param ll: Log level of the text. If the text is an error, set
it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
is just an informational text, set it to ELL_INFORMATION. Texts are
filtered with these levels. If you want to be a text displayed,
independent on what level filter is set, use ELL_NONE. */
virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
};
} // end namespace

View File

@ -869,7 +869,7 @@ namespace video
//! Gets name of this video driver.
/** \return Returns the name of the video driver, e.g. in case
of the Direct3D8 driver, it would return "Direct3D 8.1". */
virtual const wchar_t* getName() const =0;
virtual const char* getName() const =0;
//! Adds an external image loader to the engine.
/** This is useful if the Irrlicht Engine should be able to load

View File

@ -17,6 +17,9 @@ namespace io
*/
typedef core::string<fschar_t> path;
// Type only exists for historcal reasons, paths are always char now.
static_assert(sizeof(fschar_t) == sizeof(char));
//! Used in places where we identify objects by a filename, but don't actually work with the real filename
/** Irrlicht is internally not case-sensitive when it comes to names.
Also this class is a first step towards support for correctly serializing renamed objects.
@ -62,11 +65,6 @@ struct SNamedPath
{
return core::stringc(getPath());
}
//! Implicit cast to io::path
operator core::stringw() const
{
return core::stringw(getPath());
}
protected:
// convert the given path string to a name string.