Modernize to C++11: Use for-range loop.
This commit is contained in:
parent
3bdeac98bf
commit
55b3f1936f
17 changed files with 66 additions and 71 deletions
|
@ -63,10 +63,10 @@ float GetScaleFactorFromPath(const base::FilePath& path) {
|
|||
|
||||
// We don't try to convert string to float here because it is very very
|
||||
// expensive.
|
||||
for (unsigned i = 0; i < node::arraysize(kScaleFactorPairs); ++i) {
|
||||
if (base::EndsWith(filename, kScaleFactorPairs[i].name,
|
||||
for (auto& kScaleFactorPair : kScaleFactorPairs) {
|
||||
if (base::EndsWith(filename, kScaleFactorPair.name,
|
||||
base::CompareCase::INSENSITIVE_ASCII))
|
||||
return kScaleFactorPairs[i].scale;
|
||||
return kScaleFactorPair.scale;
|
||||
}
|
||||
|
||||
return 1.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue