1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Move std::tie out of headers

This commit is contained in:
DS 2024-09-14 12:10:11 +02:00 committed by GitHub
parent a6219ab955
commit c54f5a2137
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 41 deletions

View file

@ -24,10 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "constants.h"
#include "util/basic_macros.h"
#include "util/string.h"
#include <list>
#include <mutex>
#include <functional>
#include <tuple>
#include <string>
#define PLAYERNAME_SIZE 20
@ -133,23 +131,10 @@ struct PlayerPhysicsOverride
float acceleration_fast = 1.f;
float speed_walk = 1.f;
private:
auto tie() const {
// Make sure to add new members to this list!
return std::tie(
speed, jump, gravity, sneak, sneak_glitch, new_move, speed_climb, speed_crouch,
liquid_fluidity, liquid_fluidity_smooth, liquid_sink, acceleration_default,
acceleration_air, speed_fast, acceleration_fast, speed_walk
);
}
public:
bool operator==(const PlayerPhysicsOverride &other) const {
return tie() == other.tie();
};
bool operator==(const PlayerPhysicsOverride &other) const;
bool operator!=(const PlayerPhysicsOverride &other) const {
return tie() != other.tie();
};
return !(*this == other);
}
};
class Map;