mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
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:
parent
2bf21dae3d
commit
6d5d0a154b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue