Make lua source code string const
This commit is contained in:
parent
35bbfac000
commit
1d95508222
|
|
@ -11,6 +11,8 @@ AutoLuaKey::AutoLuaKey() {
|
|||
lua.create_named_table("environments");
|
||||
|
||||
bind_lua_functions();
|
||||
|
||||
// TODO: Load scripts from a folder and bind this function for lua to call
|
||||
register_lua_script("lua1", R"(
|
||||
function main()
|
||||
print('Hello from Lua! 1')
|
||||
|
|
@ -41,7 +43,7 @@ void AutoLuaKey::bind_ydotool() {
|
|||
|
||||
int AutoLuaKey::lua_loop() {
|
||||
// emit global lua function to execute
|
||||
std::string lua_code = R"(
|
||||
const std::string lua_code = R"(
|
||||
function main()
|
||||
for i = 1, 10 do
|
||||
-- Execute each environment's main function
|
||||
|
|
|
|||
Loading…
Reference in New Issue