common Scene: return FailedAllocation if it really failed at memory allocation.

Due to change of f0ecc67, the return type of reserve() is changed to bool,
which can return the result for the fail case.
This commit is contained in:
JunsuChoi 2021-06-17 12:04:12 +09:00 committed by Hermet Park
parent 2bf21dae3d
commit 6d5d0a154b

View file

@ -56,7 +56,7 @@ Result Scene::push(unique_ptr<Paint> paint) noexcept
Result Scene::reserve(uint32_t size) noexcept
{
pImpl->paints.reserve(size);
if (!pImpl->paints.reserve(size)) return Result::FailedAllocation;
return Result::Success;
}