File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,10 @@ namespace ldtk {
33
33
template <typename T>
34
34
#if defined LDTK_FIELD_PUBLIC_OPTIONAL
35
35
struct Field : IField, public optional<T>
36
- {
37
36
#else
38
37
struct Field : IField, private optional<T>
39
- {
40
38
#endif
39
+ {
41
40
private:
42
41
static const ArrayField<T> m_dummy;
43
42
@@ -63,16 +62,18 @@ namespace ldtk {
63
62
template <class T >
64
63
auto operator ==(const Field<T>& lhs, const T& rhs) -> bool
65
64
{
66
- if (lhs.is_null ())
65
+ if (lhs.is_null ()) {
67
66
return false ;
67
+ }
68
68
return (lhs.value () == rhs);
69
69
}
70
70
71
71
template <class T >
72
72
auto operator ==(const T& lhs, const Field<T>& rhs) -> bool
73
73
{
74
- if (rhs.is_null ())
74
+ if (rhs.is_null ()) {
75
75
return false ;
76
+ }
76
77
return (rhs.value () == lhs);
77
78
}
78
79
@@ -92,6 +93,7 @@ namespace ldtk {
92
93
struct ArrayField : IField, std::vector<Field<T>>
93
94
{
94
95
using value_type = T;
96
+
95
97
ArrayField () = default ;
96
98
explicit ArrayField (const std::vector<Field<T>>& vals) : std::vector<Field<T>>(vals) {}
97
99
You can’t perform that action at this time.
0 commit comments