mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
vcmi: use std::optional
This commit is contained in:
@ -53,10 +53,10 @@ public:
|
||||
void push(const JsonNode & value);
|
||||
|
||||
template<typename T>
|
||||
void push(const boost::optional<T> & value)
|
||||
void push(const std::optional<T> & value)
|
||||
{
|
||||
if(value.is_initialized())
|
||||
push(value.get());
|
||||
if(value.has_value())
|
||||
push(value.value());
|
||||
else
|
||||
pushNil();
|
||||
}
|
||||
|
Reference in New Issue
Block a user