Merge pull request #701 from isvogor-foi/develop

fmt rename to fmt_ to avoid naming conflict with the spdlog library
This commit is contained in:
The Phantom Derpstorm 2018-09-03 09:40:02 -04:00 committed by GitHub
commit 4f974a7424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 53 deletions

View File

@ -16571,25 +16571,25 @@ namespace sol {
struct error_result {
int results;
const char* fmt;
const char* fmt_;
std::array<const char*, 4> args;
error_result() : results(0), fmt(nullptr) {
error_result() : results(0), fmt_(nullptr) {
}
error_result(int results) : results(results), fmt(nullptr) {
error_result(int results) : results(results), fmt_(nullptr) {
}
error_result(const char* fmt, const char* msg) : results(0), fmt(fmt) {
error_result(const char* fmt_, const char* msg) : results(0), fmt_(fmt_) {
args[0] = msg;
}
};
inline int handle_errors(lua_State* L, const error_result& er) {
if (er.fmt == nullptr) {
if (er.fmt_ == nullptr) {
return er.results;
}
return luaL_error(L, er.fmt, er.args[0], er.args[1], er.args[2], er.args[3]);
return luaL_error(L, er.fmt_, er.args[0], er.args[1], er.args[2], er.args[3]);
}
template <typename X, typename = void>

View File

@ -456,25 +456,25 @@ namespace sol {
struct error_result {
int results;
const char* fmt;
const char* fmt_;
std::array<const char*, 4> args;
error_result() : results(0), fmt(nullptr) {
error_result() : results(0), fmt_(nullptr) {
}
error_result(int results) : results(results), fmt(nullptr) {
error_result(int results) : results(results), fmt_(nullptr) {
}
error_result(const char* fmt, const char* msg) : results(0), fmt(fmt) {
error_result(const char* fmt_, const char* msg) : results(0), fmt_(fmt_) {
args[0] = msg;
}
};
inline int handle_errors(lua_State* L, const error_result& er) {
if (er.fmt == nullptr) {
if (er.fmt_ == nullptr) {
return er.results;
}
return luaL_error(L, er.fmt, er.args[0], er.args[1], er.args[2], er.args[3]);
return luaL_error(L, er.fmt_, er.args[0], er.args[1], er.args[2], er.args[3]);
}
template <typename X, typename = void>