mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Move std::tie out of headers
This commit is contained in:
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "settings.h"
|
||||
#include "log.h"
|
||||
#include "porting.h" // strlcpy
|
||||
#include <tuple>
|
||||
|
||||
|
||||
bool is_valid_player_name(std::string_view name) {
|
||||
@@ -229,3 +230,19 @@ void PlayerControl::unpackKeysPressed(u32 keypress_bits)
|
||||
place = keypress_bits & (1 << 8);
|
||||
zoom = keypress_bits & (1 << 9);
|
||||
}
|
||||
|
||||
static auto tie(const PlayerPhysicsOverride &o)
|
||||
{
|
||||
// Make sure to add new members to this list!
|
||||
return std::tie(
|
||||
o.speed, o.jump, o.gravity, o.sneak, o.sneak_glitch, o.new_move, o.speed_climb,
|
||||
o.speed_crouch, o.liquid_fluidity, o.liquid_fluidity_smooth, o.liquid_sink,
|
||||
o.acceleration_default, o.acceleration_air, o.speed_fast, o.acceleration_fast,
|
||||
o.speed_walk
|
||||
);
|
||||
}
|
||||
|
||||
bool PlayerPhysicsOverride::operator==(const PlayerPhysicsOverride &other) const
|
||||
{
|
||||
return tie(*this) == tie(other);
|
||||
}
|
||||
|
Reference in New Issue
Block a user