| Index: Source/core/frame/SubresourceIntegrity.cpp
|
| diff --git a/Source/core/frame/SubresourceIntegrity.cpp b/Source/core/frame/SubresourceIntegrity.cpp
|
| index ac8d38f0e5ff0ad54ed9dda26bdb389f2c1cf0a4..0e041528d1f6cfa6a5db2bee128e5e2e9caf9afa 100644
|
| --- a/Source/core/frame/SubresourceIntegrity.cpp
|
| +++ b/Source/core/frame/SubresourceIntegrity.cpp
|
| @@ -63,13 +63,9 @@ static String algorithmToString(HashAlgorithm algorithm)
|
| { HashAlgorithmSha512, "SHA-512" }
|
| };
|
|
|
| - // See comment in parseIntegrityAttribute about why sizeof() is used
|
| - // instead of WTF_ARRAY_LENGTH.
|
| - size_t i = 0;
|
| - size_t kSupportedAlgorithmsLength = sizeof(kAlgorithmToString) / sizeof(kAlgorithmToString[0]);
|
| - for (; i < kSupportedAlgorithmsLength; i++) {
|
| - if (kAlgorithmToString[i].algorithm == algorithm)
|
| - return kAlgorithmToString[i].name;
|
| + for (const auto& algorithmToString : kAlgorithmToString) {
|
| + if (algorithmToString.algorithm == algorithm)
|
| + return algorithmToString.name;
|
| }
|
|
|
| ASSERT_NOT_REACHED();
|
|
|