1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Take advantage of some custom formatter shortcuts

This commit is contained in:
2014-05-15 23:17:32 -07:00
parent 3f92409a21
commit 2048b641d3
7 changed files with 43 additions and 8 deletions

View File

@ -199,6 +199,11 @@ plFileName plFileName::Join(const plFileName &base, const plFileName &path)
return base.fName + path.fName.Substr(1);
}
PL_FORMAT_IMPL(const plFileName &)
{
return PL_FORMAT_FORWARD(format, value.AsString());
}
/* plFileInfo */
plFileInfo::plFileInfo(const plFileName &filename)

View File

@ -47,6 +47,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <cstdio>
#include <cstddef>
#include "plFormat.h"
#if HS_BUILD_FOR_WIN32
# define PATH_SEPARATOR '\\'
# define PATH_SEPARATOR_STR "\\"
@ -225,6 +227,10 @@ inline plFileName operator+(const char *left, const plFileName &right)
{ return left + right.AsString(); }
// Shortcut for use in plFormat
PL_FORMAT_TYPE(const plFileName &)
/** Structure to get information about a file by name.
* \sa plFileName
*/

View File

@ -144,6 +144,9 @@ namespace plFormat_Private
plStringBuffer<char> _impl_plFormat_DataHandler( \
const plFormat_Private::FormatSpec &format, _type value)
#define PL_FORMAT_FORWARD(format, fwd_value) \
_impl_plFormat_DataHandler((format), (fwd_value))
PL_FORMAT_TYPE(char)
PL_FORMAT_TYPE(wchar_t)
PL_FORMAT_TYPE(signed char)