Browse Source

update: mark group mirror as constexpr

legacy
Dnomd343 3 months ago
parent
commit
8e416cc314
  1. 4
      src/core/group/group.h
  2. 4
      src/core/group/internal/group.inl

4
src/core/group/group.h

@ -188,9 +188,9 @@ public:
// TODO: add `is_xxx_mirror` interface
[[nodiscard]] Group to_vertical_mirror() const;
[[nodiscard]] constexpr Group to_vertical_mirror() const;
[[nodiscard]] Group to_horizontal_mirror() const;
[[nodiscard]] constexpr Group to_horizontal_mirror() const;
private:
uint32_t type_id_;

4
src/core/group/internal/group.inl

@ -24,11 +24,11 @@ constexpr uint32_t Group::flat_id() const {
// ----------------------------------------------------------------------------------------- //
Group Group::to_vertical_mirror() const {
constexpr Group Group::to_vertical_mirror() const {
return Group::unsafe_create(type_id_, GROUP_MIRROR_V[flat_id()]);
}
Group Group::to_horizontal_mirror() const {
constexpr Group Group::to_horizontal_mirror() const {
return Group::unsafe_create(type_id_, GROUP_MIRROR_H[flat_id()]);
}

Loading…
Cancel
Save