Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
olanti-p committed Apr 11, 2023
1 parent 594a0a8 commit a8da545
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/catalua_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static void reg_point_tripoint( sol::state &lua )
luna::set_fx( ut, sol::meta_function::addition, &point::operator+ );
// point - point
// sol::resolve here makes it possible to specify which overload to use
luna::set_fx( ut, sol::meta_function::subtraction, sol::resolve< point( const point & ) const >
luna::set_fx( ut, sol::meta_function::subtraction, sol::resolve< point( point ) const >
( &point::operator- ) );
// point * int
luna::set_fx( ut, sol::meta_function::multiplication, &point::operator* );
Expand Down Expand Up @@ -295,13 +295,13 @@ static void reg_point_tripoint( sol::state &lua )
// tripoint + point (overload 2)
luna::set_fx( ut, sol::meta_function::addition, sol::overload(
sol::resolve< tripoint( const tripoint & ) const > ( &tripoint::operator+ ),
sol::resolve< tripoint( const point & ) const > ( &tripoint::operator+ )
sol::resolve< tripoint( point ) const > ( &tripoint::operator+ )
) );
// tripoint - tripoint (overload 1)
// tripoint - point (overload 2)
luna::set_fx( ut, sol::meta_function::subtraction, sol::overload(
sol::resolve< tripoint( const tripoint & ) const > ( &tripoint::operator- ),
sol::resolve< tripoint( const point & ) const > ( &tripoint::operator- )
sol::resolve< tripoint( point ) const > ( &tripoint::operator- )
) );
// tripoint * int
luna::set_fx( ut, sol::meta_function::multiplication, &tripoint::operator* );
Expand Down Expand Up @@ -534,15 +534,15 @@ static void reg_coords_library( sol::state &lua )

luna::set_fx( lib, "rl_dist", sol::overload(
sol::resolve<int( const tripoint &, const tripoint & )>( rl_dist ),
sol::resolve<int( const point &, const point & )>( rl_dist )
sol::resolve<int( point, point )>( rl_dist )
) );
luna::set_fx( lib, "trig_dist", sol::overload(
sol::resolve<float( const tripoint &, const tripoint & )>( trig_dist ),
sol::resolve<float( const point &, const point & )>( trig_dist )
sol::resolve<float( point, point )>( trig_dist )
) );
luna::set_fx( lib, "square_dist", sol::overload(
sol::resolve<int( const tripoint &, const tripoint & )>( square_dist ),
sol::resolve<int( const point &, const point & )>( square_dist )
sol::resolve<int( point, point )>( square_dist )
) );

luna::finalize_lib( lib );
Expand Down
1 change: 0 additions & 1 deletion src/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,6 @@ bool main_menu::load_character_tab( const std::string &worldname )
} );

g->gamemode = nullptr;
WORLDPTR world = world_generator->get_world( worldname );
world_generator->last_world_name = world->world_name;
world_generator->last_character_name = savegames[opt_val].decoded_name();
world_generator->save_last_world_info();
Expand Down
3 changes: 2 additions & 1 deletion src/mod_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <cstddef>
#include <map>
#include <optional>
#include <set>
#include <string>
#include <utility>
Expand Down Expand Up @@ -77,7 +78,7 @@ struct MOD_INFORMATION {
std::string version;

/** If mod uses Lua API, specifies version of the API being used. */
cata::optional<int> lua_api_version;
std::optional<int> lua_api_version;

/** What other mods must be loaded prior to this one? */
std::vector<mod_id> dependencies;
Expand Down

0 comments on commit a8da545

Please sign in to comment.