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
|
@ -112,13 +112,13 @@ static void AddPepperBasedWidevine(
|
|||
supported_codecs |= media::EME_CODEC_MP4_AAC;
|
||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
||||
|
||||
for (size_t i = 0; i < codecs.size(); ++i) {
|
||||
if (codecs[i] == kCdmSupportedCodecVp8)
|
||||
for (auto& codec : codecs) {
|
||||
if (codec == kCdmSupportedCodecVp8)
|
||||
supported_codecs |= media::EME_CODEC_WEBM_VP8;
|
||||
if (codecs[i] == kCdmSupportedCodecVp9)
|
||||
if (codec == kCdmSupportedCodecVp9)
|
||||
supported_codecs |= media::EME_CODEC_WEBM_VP9;
|
||||
#if defined(USE_PROPRIETARY_CODECS)
|
||||
if (codecs[i] == kCdmSupportedCodecAvc1)
|
||||
if (codec == kCdmSupportedCodecAvc1)
|
||||
supported_codecs |= media::EME_CODEC_MP4_AVC1;
|
||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
||||
}
|
||||
|
|
|
@ -980,10 +980,10 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
|
|||
PrintPageInternal(page_params, frame);
|
||||
}
|
||||
} else {
|
||||
for (size_t i = 0; i < params.pages.size(); ++i) {
|
||||
if (params.pages[i] >= page_count)
|
||||
for (int page : params.pages) {
|
||||
if (page >= page_count)
|
||||
break;
|
||||
page_params.page_number = params.pages[i];
|
||||
page_params.page_number = page;
|
||||
PrintPageInternal(page_params, frame);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue