refactor(templates): remove the GetData function from the non-container class
This commit is contained in:
@ -189,9 +189,6 @@ public:
|
||||
constexpr bool IsValid() const { return bIsValid; }
|
||||
constexpr explicit operator bool() const { return bIsValid; }
|
||||
|
||||
constexpr void* GetData() { return &Value; }
|
||||
constexpr const void* GetData() const { return &Value; }
|
||||
|
||||
constexpr OptionalType& GetValue() & { checkf(IsValid(), TEXT("It is an error to call GetValue() on an unset TOptional. Please either check IsValid() or use Get(DefaultValue) instead.")); return *reinterpret_cast< OptionalType*>(&Value); }
|
||||
constexpr OptionalType&& GetValue() && { checkf(IsValid(), TEXT("It is an error to call GetValue() on an unset TOptional. Please either check IsValid() or use Get(DefaultValue) instead.")); return MoveTemp(*reinterpret_cast< OptionalType*>(&Value)); }
|
||||
constexpr const OptionalType& GetValue() const& { checkf(IsValid(), TEXT("It is an error to call GetValue() on an unset TOptional. Please either check IsValid() or use Get(DefaultValue) instead.")); return *reinterpret_cast<const OptionalType*>(&Value); }
|
||||
|
Reference in New Issue
Block a user