mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 07:26:51 +00:00
Fixed build
This commit is contained in:
parent
78373d7c59
commit
e334e5f43d
@ -324,7 +324,7 @@ public:
|
|||||||
instances--;
|
instances--;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const bool do_throw()
|
static bool do_throw()
|
||||||
{
|
{
|
||||||
return instances > 0;
|
return instances > 0;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,9 @@ public:
|
|||||||
if(opt_) {
|
if(opt_) {
|
||||||
return opt_->get();
|
return opt_->get();
|
||||||
} else {
|
} else {
|
||||||
throw std::bad_optional_access{};
|
// We're going to drop this codepath once we can use optional::value anyway, but just
|
||||||
|
// noting we want this function to ultimately throw std::bad_optional_access.
|
||||||
|
throw std::runtime_error("Optional reference has no value");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user