mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "log.h"
|
||||
#include "util/serialize.h"
|
||||
#include <sstream>
|
||||
#include <tuple>
|
||||
|
||||
static const video::SColor NULL_BGCOLOR{0, 1, 1, 1};
|
||||
|
||||
|
@ -85,6 +86,27 @@ std::string ObjectProperties::dump() const
|
|||
return os.str();
|
||||
}
|
||||
|
||||
static auto tie(const ObjectProperties &o)
|
||||
{
|
||||
// Make sure to add new members to this list!
|
||||
return std::tie(
|
||||
o.textures, o.colors, o.collisionbox, o.selectionbox, o.visual, o.mesh,
|
||||
o.damage_texture_modifier, o.nametag, o.infotext, o.wield_item, o.visual_size,
|
||||
o.nametag_color, o.nametag_bgcolor, o.spritediv, o.initial_sprite_basepos,
|
||||
o.stepheight, o.automatic_rotate, o.automatic_face_movement_dir_offset,
|
||||
o.automatic_face_movement_max_rotation_per_sec, o.eye_height, o.zoom_fov,
|
||||
o.hp_max, o.breath_max, o.glow, o.pointable, o.physical, o.collideWithObjects,
|
||||
o.rotate_selectionbox, o.is_visible, o.makes_footstep_sound,
|
||||
o.automatic_face_movement_dir, o.backface_culling, o.static_save, o.use_texture_alpha,
|
||||
o.shaded, o.show_on_minimap
|
||||
);
|
||||
}
|
||||
|
||||
bool ObjectProperties::operator==(const ObjectProperties &other) const
|
||||
{
|
||||
return tie(*this) == tie(other);
|
||||
}
|
||||
|
||||
bool ObjectProperties::validate()
|
||||
{
|
||||
const char *func = "ObjectProperties::validate(): ";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue