Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Madour committed Jun 18, 2024
1 parent 90bd6c8 commit f43a78e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/LDtkLoader/Field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ namespace ldtk {
template <typename T>
#if defined LDTK_FIELD_PUBLIC_OPTIONAL
struct Field : IField, public optional<T>
{
#else
struct Field : IField, private optional<T>
{
#endif
{
private:
static const ArrayField<T> m_dummy;

Expand All @@ -63,16 +62,18 @@ namespace ldtk {
template <class T>
auto operator==(const Field<T>& lhs, const T& rhs) -> bool
{
if (lhs.is_null())
if (lhs.is_null()) {
return false;
}
return (lhs.value() == rhs);
}

template <class T>
auto operator==(const T& lhs, const Field<T>& rhs) -> bool
{
if (rhs.is_null())
if (rhs.is_null()) {
return false;
}
return (rhs.value() == lhs);
}

Expand All @@ -92,6 +93,7 @@ namespace ldtk {
struct ArrayField : IField, std::vector<Field<T>>
{
using value_type = T;

ArrayField() = default;
explicit ArrayField(const std::vector<Field<T>>& vals) : std::vector<Field<T>>(vals) {}

Expand Down

0 comments on commit f43a78e

Please sign in to comment.