Skip to content

Commit

Permalink
Update impeller/renderer/pool.h
Browse files Browse the repository at this point in the history
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
  • Loading branch information
gaaclarke and jonahwilliams committed Aug 1, 2023
1 parent 7fcefb1 commit 71266e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions impeller/renderer/pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ class Pool {
std::shared_ptr<T> Grab() {
if (pool_.empty()) {
return T::Create();
} else {
std::shared_ptr<T> result = pool_.back();
pool_.pop_back();
return result;
}
std::shared_ptr<T> result = pool_.back();
pool_.pop_back();
return result;
}

void Recycle(std::shared_ptr<T> object) {
Expand Down

0 comments on commit 71266e3

Please sign in to comment.