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

Unified Diff: gpu/command_buffer/common/mailbox.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 | « gpu/command_buffer/common/id_allocator_test.cc ('k') | gpu/command_buffer/common/mailbox_holder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/mailbox.cc
diff --git a/gpu/command_buffer/common/mailbox.cc b/gpu/command_buffer/common/mailbox.cc
index 21602ab6d4df291b19348f365d9d266abce12663..8ca3d53cc4effa52891c4649c37a4904decbb2b2 100644
--- a/gpu/command_buffer/common/mailbox.cc
+++ b/gpu/command_buffer/common/mailbox.cc
@@ -4,6 +4,8 @@
#include "gpu/command_buffer/common/mailbox.h"
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#include "base/logging.h"
@@ -27,7 +29,7 @@ void Mailbox::SetZero() {
memset(name, 0, sizeof(name));
}
-void Mailbox::SetName(const int8* n) {
+void Mailbox::SetName(const int8_t* n) {
DCHECK(IsZero() || !memcmp(name, n, sizeof(name)));
memcpy(name, n, sizeof(name));
}
@@ -37,7 +39,7 @@ Mailbox Mailbox::Generate() {
// Generates cryptographically-secure bytes.
base::RandBytes(result.name, sizeof(result.name));
#if !defined(NDEBUG)
- int8 value = 1;
+ int8_t value = 1;
for (size_t i = 1; i < sizeof(result.name); ++i)
value ^= result.name[i];
result.name[0] = value;
@@ -47,7 +49,7 @@ Mailbox Mailbox::Generate() {
bool Mailbox::Verify() const {
#if !defined(NDEBUG)
- int8 value = 1;
+ int8_t value = 1;
for (size_t i = 0; i < sizeof(name); ++i)
value ^= name[i];
return value == 0;
« no previous file with comments | « gpu/command_buffer/common/id_allocator_test.cc ('k') | gpu/command_buffer/common/mailbox_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698