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

Unified Diff: ppapi/shared_impl/id_assignment.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
Index: ppapi/shared_impl/id_assignment.cc
diff --git a/ppapi/shared_impl/id_assignment.cc b/ppapi/shared_impl/id_assignment.cc
index 5c5aed6b82271e5795eff0e55baeafb70419ad56..b1120e9c2b8d4652776d4610afebf40012a05263 100644
--- a/ppapi/shared_impl/id_assignment.cc
+++ b/ppapi/shared_impl/id_assignment.cc
@@ -4,13 +4,13 @@
#include "ppapi/shared_impl/id_assignment.h"
-#include "base/basictypes.h"
+#include <stdint.h>
namespace ppapi {
const unsigned int kPPIdTypeBits = 2;
-const int32 kMaxPPId = kint32max >> kPPIdTypeBits;
+const int32_t kMaxPPId = INT32_MAX >> kPPIdTypeBits;
raymes 2015/12/06 23:16:34 Hmm why not use numeric_limits here?
Avi (use Gerrit) 2015/12/06 23:50:29 Because that's not guaranteed to be constexpr, and
static_assert(PP_ID_TYPE_COUNT <= (1 << kPPIdTypeBits),
"kPPIdTypeBits is too small for all id types");

Powered by Google App Engine
This is Rietveld 408576698