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

Unified Diff: ui/gfx/color_analysis.cc

Issue 1499423004: Remove kint32max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint9
Patch Set: rebase Created 5 years 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
« no previous file with comments | « ppapi/shared_impl/id_assignment.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_analysis.cc
diff --git a/ui/gfx/color_analysis.cc b/ui/gfx/color_analysis.cc
index 16695c9a0b9c997214fab6bb47a2329d7a40ea54..94eac52f15f5e8615ef3c0fef7464f6878a452a9 100644
--- a/ui/gfx/color_analysis.cc
+++ b/ui/gfx/color_analysis.cc
@@ -4,6 +4,8 @@
#include "ui/gfx/color_analysis.h"
+#include <stdint.h>
+
#include <algorithm>
#include <limits>
#include <vector>
@@ -186,7 +188,7 @@ SkColor FindClosestColor(const uint8_t* image,
uint8_t in_g = SkColorGetG(color);
uint8_t in_b = SkColorGetB(color);
// Search using distance-squared to avoid expensive sqrt() operations.
- int best_distance_squared = kint32max;
+ int best_distance_squared = std::numeric_limits<int32_t>::max();
SkColor best_color = color;
const uint8_t* byte = image;
for (int i = 0; i < width * height; ++i) {
« no previous file with comments | « ppapi/shared_impl/id_assignment.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698