mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-23 03:05:27 +00:00
[nstool] Add more constructors to sOptional
This commit is contained in:
parent
a1c5f91dc0
commit
badebc6b65
|
@ -48,6 +48,8 @@ struct sOptional
|
||||||
bool isSet;
|
bool isSet;
|
||||||
T var;
|
T var;
|
||||||
inline sOptional() : isSet(false) {}
|
inline sOptional() : isSet(false) {}
|
||||||
|
inline sOptional(const T& other) : isSet(true), var(other) {}
|
||||||
|
inline sOptional(const sOptional& other) : isSet(other.isSet), var(other.var) {}
|
||||||
inline const T& operator=(const T& other) { isSet = true; var = other; return var; }
|
inline const T& operator=(const T& other) { isSet = true; var = other; return var; }
|
||||||
inline const sOptional<T>& operator=(const sOptional<T>& other)
|
inline const sOptional<T>& operator=(const sOptional<T>& other)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue