1
0
Fork 0

C++17 stuff

This commit is contained in:
Tiger Wang 2020-09-28 23:37:49 +01:00
parent 429117c1f6
commit f9ac6543ab
3 changed files with 2 additions and 9 deletions

View File

@ -2107,7 +2107,7 @@ void cLuaState::LogStackTrace(lua_State * a_LuaState, int a_StartingDepth)
int cLuaState::ApiParamError(fmt::string_view a_Msg)
int cLuaState::ApiParamError(std::string_view a_Msg)
{
// Retrieve current function name
lua_Debug entry;

View File

@ -838,7 +838,7 @@ public:
/** Prints the message, prefixed with the current function name, then logs the stack contents and raises a Lua error.
To be used for bindings when they detect bad parameters.
Doesn't return, but a dummy return type is provided so that Lua API functions may do "return ApiParamError(...)". */
int ApiParamError(fmt::string_view a_Msg);
int ApiParamError(std::string_view a_Msg);
/** Formats and prints the message using printf-style format specifiers, but prefixed with the current function name, then logs the stack contents and raises a Lua error.
To be used for bindings when they detect bad parameters.

View File

@ -426,7 +426,6 @@ public:
template <typename FormatContext>
auto format(const Vector3<What> & a_Vec, FormatContext & a_Ctx)
-> typename FormatContext::iterator
{
Write(a_Ctx, "{");
Write(a_Ctx, a_Vec.x);
@ -493,9 +492,3 @@ typedef Vector3<int> Vector3i;
typedef std::vector<Vector3i> cVector3iArray;