Commit cc2a2f8f authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Use base::size rather than arraysize in qcms's fuzzer.

This is purely a mechanical change; there is no intended behavior change.

BUG=837308
R=enne@chromium.org

Change-Id: I2a28091c571d44f8c828c3698d3dd4a7e6fac220
Reviewed-on: https://chromium-review.googlesource.com/c/1392747
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: default avatarenne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619470}
parent 70042b8b
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <random> #include <random>
#include "base/logging.h" #include "base/logging.h"
#include "base/stl_util.h"
#include "testing/libfuzzer/fuzzers/color_space_data.h" #include "testing/libfuzzer/fuzzers/color_space_data.h"
#include "third_party/qcms/src/qcms.h" #include "third_party/qcms/src/qcms.h"
...@@ -18,7 +19,7 @@ static void GeneratePixels(size_t hash) { ...@@ -18,7 +19,7 @@ static void GeneratePixels(size_t hash) {
static std::uniform_int_distribution<uint32_t> uniform(0u, ~0u); static std::uniform_int_distribution<uint32_t> uniform(0u, ~0u);
std::mt19937_64 random(hash); std::mt19937_64 random(hash);
for (size_t i = 0; i < arraysize(pixels); ++i) for (size_t i = 0; i < base::size(pixels); ++i)
pixels[i] = uniform(random); pixels[i] = uniform(random);
} }
...@@ -46,9 +47,9 @@ static void ColorTransform(bool input) { ...@@ -46,9 +47,9 @@ static void ColorTransform(bool input) {
static qcms_profile* SelectProfile(size_t hash) { static qcms_profile* SelectProfile(size_t hash) {
static qcms_profile* profiles[4] = { static qcms_profile* profiles[4] = {
qcms_profile_from_memory(kSRGBData, arraysize(kSRGBData)), qcms_profile_from_memory(kSRGBData, base::size(kSRGBData)),
qcms_profile_from_memory(kSRGBPara, arraysize(kSRGBPara)), qcms_profile_from_memory(kSRGBPara, base::size(kSRGBPara)),
qcms_profile_from_memory(kAdobeData, arraysize(kAdobeData)), qcms_profile_from_memory(kAdobeData, base::size(kAdobeData)),
qcms_profile_sRGB(), qcms_profile_sRGB(),
}; };
......
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