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

Unified Diff: gpu/config/gpu_test_expectations_parser.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/config/gpu_test_expectations_parser.h ('k') | gpu/config/gpu_test_expectations_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_test_expectations_parser.cc
diff --git a/gpu/config/gpu_test_expectations_parser.cc b/gpu/config/gpu_test_expectations_parser.cc
index 6dac74e21cb530c780293e1266dbfdc69e52eb30..2ae972b29d6b0d0c34b8db8ececf0d88896dae60 100644
--- a/gpu/config/gpu_test_expectations_parser.cc
+++ b/gpu/config/gpu_test_expectations_parser.cc
@@ -4,6 +4,9 @@
#include "gpu/config/gpu_test_expectations_parser.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
@@ -77,7 +80,7 @@ enum Token {
struct TokenInfo {
const char* name;
- int32 flag;
+ int32_t flag;
};
const TokenInfo kTokenData[] = {
@@ -151,7 +154,7 @@ Token ParseToken(const std::string& word) {
if (base::StartsWith(word, "0x", base::CompareCase::INSENSITIVE_ASCII))
return kConfigGPUDeviceID;
- for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
+ for (int32_t i = 0; i < kNumberOfExactMatchTokens; ++i) {
if (base::LowerCaseEqualsASCII(word, kTokenData[i].name))
return static_cast<Token>(i);
}
@@ -217,7 +220,7 @@ bool GPUTestExpectationsParser::LoadTestExpectations(
return LoadTestExpectations(data);
}
-int32 GPUTestExpectationsParser::GetTestExpectation(
+int32_t GPUTestExpectationsParser::GetTestExpectation(
const std::string& test_name,
const GPUTestBotConfig& bot_config) const {
for (size_t i = 0; i < entries_.size(); ++i) {
@@ -291,7 +294,7 @@ bool GPUTestExpectationsParser::ParseLine(
std::vector<std::string> tokens = base::SplitString(
line_data, base::kWhitespaceASCII, base::KEEP_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
- int32 stage = kLineParserBegin;
+ int32_t stage = kLineParserBegin;
GPUTestExpectationEntry entry;
entry.line_number = line_number;
GPUTestConfig& config = entry.test_config;
@@ -419,8 +422,9 @@ bool GPUTestExpectationsParser::ParseLine(
return false;
}
-bool GPUTestExpectationsParser::UpdateTestConfig(
- GPUTestConfig* config, int32 token, size_t line_number) {
+bool GPUTestExpectationsParser::UpdateTestConfig(GPUTestConfig* config,
+ int32_t token,
+ size_t line_number) {
DCHECK(config);
switch (token) {
case kConfigWinXP:
@@ -452,8 +456,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
case kConfigIntel:
case kConfigVMWare:
{
- uint32 gpu_vendor =
- static_cast<uint32>(kTokenData[token].flag);
+ uint32_t gpu_vendor = static_cast<uint32_t>(kTokenData[token].flag);
for (size_t i = 0; i < config->gpu_vendor().size(); ++i) {
if (config->gpu_vendor()[i] == gpu_vendor) {
PushErrorMessage(
@@ -499,7 +502,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
const std::string& gpu_device_id,
size_t line_number) {
DCHECK(config);
- uint32 device_id = 0;
+ uint32_t device_id = 0;
if (config->gpu_device_id() != 0 ||
!base::HexStringToUInt(gpu_device_id, &device_id) ||
device_id == 0) {
« no previous file with comments | « gpu/config/gpu_test_expectations_parser.h ('k') | gpu/config/gpu_test_expectations_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698