Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 10064e0b2c65d4cc89d2ce4f2bfa82737f29b929..54d07fdff4f24947dcd722fd04358cfb4184b454 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -830,7 +830,7 @@ bool ResourceBundle::LoadBitmap(int resource_id,
SkBitmap* bitmap,
bool* fell_back_to_1x) const {
DCHECK(fell_back_to_1x);
- for (const auto& pack : data_packs_) {
+ for (auto* pack : data_packs_) {
if (pack->GetScaleFactor() == ui::SCALE_FACTOR_NONE &&
LoadBitmap(*pack, resource_id, bitmap, fell_back_to_1x)) {
DCHECK(!*fell_back_to_1x);
@@ -847,7 +847,7 @@ bool ResourceBundle::LoadBitmap(int resource_id,
// Unit tests may only have 1x data pack. Allow them to fallback to 1x
// resources.
if (is_test_resources_ && *scale_factor != ui::SCALE_FACTOR_100P) {
- for (const auto& pack : data_packs_) {
+ for (auto* pack : data_packs_) {
if (pack->GetScaleFactor() == ui::SCALE_FACTOR_100P &&
LoadBitmap(*pack, resource_id, bitmap, fell_back_to_1x)) {
*fell_back_to_1x = true;

Powered by Google App Engine
This is Rietveld 408576698