Commit 00c14f99 authored by Stephan Hartmann's avatar Stephan Hartmann Committed by Chromium LUCI CQ

libstdc++: do not use vector of const types

GNU libstdc++ std::vector explicitely forbids creating an std::vector of
const types. Remove const from type and return const_iterator instead.

Bug: 957519
Change-Id: I6a56df65e8a864fa9f473884e2125db8f0469bce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601487Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841645}
parent b496a82b
...@@ -125,7 +125,7 @@ class ImageSkiaStorage : public base::RefCountedThreadSafe<ImageSkiaStorage> { ...@@ -125,7 +125,7 @@ class ImageSkiaStorage : public base::RefCountedThreadSafe<ImageSkiaStorage> {
// one and rescale the image. // one and rescale the image.
// Right now only Windows uses 2 and other platforms use 1 by default. // Right now only Windows uses 2 and other platforms use 1 by default.
// TODO(mukai, oshima): abandon 1 code path and use 2 for every platforms. // TODO(mukai, oshima): abandon 1 code path and use 2 for every platforms.
std::vector<const ImageSkiaRep>::iterator FindRepresentation( std::vector<ImageSkiaRep>::const_iterator FindRepresentation(
float scale, float scale,
bool fetch_new_image) const; bool fetch_new_image) const;
...@@ -211,7 +211,7 @@ bool ImageSkiaStorage::HasRepresentationAtAllScales() const { ...@@ -211,7 +211,7 @@ bool ImageSkiaStorage::HasRepresentationAtAllScales() const {
return source_ && source_->HasRepresentationAtAllScales(); return source_ && source_->HasRepresentationAtAllScales();
} }
std::vector<const ImageSkiaRep>::iterator ImageSkiaStorage::FindRepresentation( std::vector<ImageSkiaRep>::const_iterator ImageSkiaStorage::FindRepresentation(
float scale, float scale,
bool fetch_new_image) const { bool fetch_new_image) const {
auto closest_iter = image_reps_.end(); auto closest_iter = image_reps_.end();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment