Possible compiler fix

This commit is contained in:
Lion Kortlepel 2021-09-17 02:44:49 +02:00
parent 79531334dd
commit e64114e4fa
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -2,7 +2,7 @@
#include "Client.h" #include "Client.h"
#include "TLuaEngine.h" #include "TLuaEngine.h"
static std::string LuaToString(sol::object Value, size_t Indent = 1) { static std::string LuaToString(const sol::object Value, size_t Indent = 1) {
switch (Value.get_type()) { switch (Value.get_type()) {
case sol::type::userdata: { case sol::type::userdata: {
std::stringstream ss; std::stringstream ss;
@ -80,7 +80,7 @@ std::tuple<int, int, int> LuaAPI::MP::GetServerVersion() {
void LuaAPI::Print(sol::variadic_args Args) { void LuaAPI::Print(sol::variadic_args Args) {
std::string ToPrint = ""; std::string ToPrint = "";
for (const auto& Arg : Args) { for (const auto& Arg : Args) {
ToPrint += LuaToString(Arg); ToPrint += LuaToString(static_cast<const sol::object>(Arg));
ToPrint += "\t"; ToPrint += "\t";
} }
luaprint(ToPrint); luaprint(ToPrint);