mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix compiler warnings about Optional field initialization order
This commit is contained in:
@@ -31,19 +31,19 @@ struct Optional
|
||||
bool hasValue;
|
||||
|
||||
Optional()
|
||||
: hasValue(false)
|
||||
, value(T())
|
||||
: value(T())
|
||||
, hasValue(false)
|
||||
{}
|
||||
|
||||
Optional(T val)
|
||||
: hasValue(true)
|
||||
, value(val)
|
||||
: value(val)
|
||||
, hasValue(true)
|
||||
{}
|
||||
|
||||
void set(T val)
|
||||
{
|
||||
hasValue = true;
|
||||
value = val;
|
||||
hasValue = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user