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

Unified Diff: ppapi/proxy/websocket_resource.cc

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
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
Index: ppapi/proxy/websocket_resource.cc
diff --git a/ppapi/proxy/websocket_resource.cc b/ppapi/proxy/websocket_resource.cc
index bc4e8535520be3abbda67352ca3200df6984b38d..b374ef3d3222b18ebb2df3c76d865d9ce2540c41 100644
--- a/ppapi/proxy/websocket_resource.cc
+++ b/ppapi/proxy/websocket_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/websocket_resource.h"
+#include <limits>
#include <set>
#include <string>
#include <vector>
@@ -26,8 +27,8 @@ const size_t kMinimumPayloadSizeWithTwoByteExtendedPayloadLength = 126;
const size_t kMinimumPayloadSizeWithEightByteExtendedPayloadLength = 0x10000;
uint64_t SaturateAdd(uint64_t a, uint64_t b) {
- if (kuint64max - a < b)
- return kuint64max;
+ if (std::numeric_limits<uint64_t>::max() - a < b)
+ return std::numeric_limits<uint64_t>::max();
return a + b;
}

Powered by Google App Engine
This is Rietveld 408576698