diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-29 15:31:52 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-05-29 15:31:52 +0200 |
commit | a6247ecf707ae9c28c259bb1cec02e92e87d135e (patch) | |
tree | a91cc5bad2dd90e67bb40d9247bc559bd8763681 /src/universe.cpp | |
parent | f125d90796a7394760e98380255117952bcb0109 (diff) | |
download | lanes-a6247ecf707ae9c28c259bb1cec02e92e87d135e.tar.gz lanes-a6247ecf707ae9c28c259bb1cec02e92e87d135e.tar.bz2 lanes-a6247ecf707ae9c28c259bb1cec02e92e87d135e.zip |
Organized namespace 'state'
Diffstat (limited to 'src/universe.cpp')
-rw-r--r-- | src/universe.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/universe.cpp b/src/universe.cpp index 172cc4c..77f799b 100644 --- a/src/universe.cpp +++ b/src/universe.cpp | |||
@@ -265,7 +265,7 @@ void Universe::initializeKeepers(lua_State* L_) | |||
265 | 265 | ||
266 | for (int const _i : std::ranges::iota_view{ 0, _nb_keepers }) { | 266 | for (int const _i : std::ranges::iota_view{ 0, _nb_keepers }) { |
267 | // note that we will leak K if we raise an error later | 267 | // note that we will leak K if we raise an error later |
268 | KeeperState const _K{ create_state(this, L_) }; // L_: settings K: | 268 | KeeperState const _K{ state::CreateState(this, L_) }; // L_: settings K: |
269 | if (_K == nullptr) { | 269 | if (_K == nullptr) { |
270 | raise_luaL_error(L_, "out of memory while creating keeper states"); | 270 | raise_luaL_error(L_, "out of memory while creating keeper states"); |
271 | } | 271 | } |
@@ -307,7 +307,7 @@ void Universe::initializeKeepers(lua_State* L_) | |||
307 | // attempt to call on_state_create(), if we have one and it is a C function | 307 | // attempt to call on_state_create(), if we have one and it is a C function |
308 | // (only support a C function because we can't transfer executable Lua code in keepers) | 308 | // (only support a C function because we can't transfer executable Lua code in keepers) |
309 | // will raise an error in L_ in case of problem | 309 | // will raise an error in L_ in case of problem |
310 | CallOnStateCreate(this, _K, L_, LookupMode::ToKeeper); | 310 | state::CallOnStateCreate(this, _K, L_, LookupMode::ToKeeper); |
311 | 311 | ||
312 | // to see VM name in Decoda debugger | 312 | // to see VM name in Decoda debugger |
313 | lua_pushfstring(_K, "Keeper #%d", _i + 1); // L_: settings K: "Keeper #n" | 313 | lua_pushfstring(_K, "Keeper #%d", _i + 1); // L_: settings K: "Keeper #n" |