commit | 40da13b77770e30c98601c937554c7bd1bec126b | [log] [tgz] |
---|---|---|
author | Mike Klein <mtklein@google.com> | Sun Feb 28 09:02:26 2021 -0600 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Sun Feb 28 16:05:35 2021 +0000 |
tree | 0d54d26ef95384e333603dc0f622048d605e3721 | |
parent | 56a1f06db241fea9fd1e7d1367fa56d94d5bf3d7 [diff] |
factor out SkLRU::insert_or_update() I keep forgetting that insert() breaks if there's an existing item with that key, so assert there's not and factor out a safer insert_or_update(). Change-Id: I5d7e3b163d651442d309b7486f8d21e64497a6a2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377537 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>