mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
Now that the project targets C++23, use the standard library's std::expected instead of the vendored tl::expected polyfill: - tl::expected -> std::expected, tl::unexpected/tl::make_unexpected -> std::unexpected - .map()/.map_error() -> .transform()/.transform_error() - #include <expected.hpp> -> #include <expected>, grouped with std headers - Remove 3rdParty/tl/expected.hpp (the tl target remains for function_ref.hpp) Co-Authored-By: Claude Fable 5 <[email protected]>
24 lines
584 B
C++
24 lines
584 B
C++
#pragma once
|
|
|
|
#include <expected>
|
|
#include <string_view>
|
|
|
|
#include <function_ref.hpp>
|
|
#include <sol/forward.hpp>
|
|
|
|
namespace devilution {
|
|
|
|
void LuaInitialize();
|
|
void LuaReloadActiveMods();
|
|
void LuaShutdown();
|
|
|
|
sol::state &GetLuaState();
|
|
sol::environment CreateLuaSandbox();
|
|
sol::object SafeCallResult(sol::protected_function_result result, bool optional);
|
|
sol::table *GetLuaEvents();
|
|
|
|
/** Adds a handler to be called when mods status changes after the initial startup. */
|
|
void AddModsChangedHandler(tl::function_ref<void()> callback);
|
|
|
|
} // namespace devilution
|