Skip to content

Commit

Permalink
Convert LuaLog() and ErrorLog() to pcstr instead of LPCSTR
Browse files Browse the repository at this point in the history
Add "LUA: " in lua output, so that I can somehow navigate in the log
mess
  • Loading branch information
Xottab-DUTY committed Aug 19, 2017
1 parent 7b30bdd commit f14fec6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xrScriptEngine/ScriptEngineScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include "Include/xrAPI/xrAPI.h"
#include "ScriptExporter.hpp"

void LuaLog(LPCSTR caMessage)
void LuaLog(pcstr caMessage)
{
if (!GlobalEnv.ScriptEngine->m_stack_is_ready)
Log(caMessage); // Xottab_DUTY: temporary workaround to get lua log output
Msg("LUA: %s", caMessage); // Xottab_DUTY: temporary workaround to get lua log output

#ifndef MASTER_GOLD
GlobalEnv.ScriptEngine->script_log(LuaMessageType::Message, "%s", caMessage);
Expand All @@ -28,10 +28,10 @@ void LuaLog(LPCSTR caMessage)
#endif
}

void ErrorLog(LPCSTR caMessage)
void ErrorLog(pcstr caMessage)
{
if (!GlobalEnv.ScriptEngine->m_stack_is_ready)
Log(caMessage); // Xottab_DUTY: temporary workaround to get lua error output
Msg("LUA Error: %s", caMessage); // Xottab_DUTY: temporary workaround to get lua error output

GlobalEnv.ScriptEngine->error_log("%s", caMessage);
#ifdef DEBUG
Expand Down Expand Up @@ -85,7 +85,7 @@ inline int bit_xor(const int i, const int j) { return i ^ j; }
inline int bit_not(const int i) { return ~i; }
inline const char* user_name() { return Core.UserName; }

void prefetch_module(LPCSTR file_name) { GlobalEnv.ScriptEngine->process_file(file_name); }
void prefetch_module(pcstr file_name) { GlobalEnv.ScriptEngine->process_file(file_name); }

struct profile_timer_script
{
Expand Down

0 comments on commit f14fec6

Please sign in to comment.