Skip to content

Commit 2237b8c

Browse files
committed
Slightly more compact code
1 parent d88aafe commit 2237b8c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/lib/core/Optional.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ class Optional
214214

215215
std::optional<T> std_optional() const
216216
{
217-
if (!HasValue())
218-
{
219-
return std::optional<T>();
220-
}
217+
VerifyOrReturnValue(HasValue(), std::nullopt);
221218
return std::make_optional(Value());
222219
}
223220

0 commit comments

Comments
 (0)