mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Move std::tie out of headers
This commit is contained in:
parent
a6219ab955
commit
c54f5a2137
4 changed files with 45 additions and 41 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue