summaryrefslogtreecommitdiffstats
path: root/net/base/net_log_unittest.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 00:34:04 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 00:34:04 +0000
commit34f40946dab92acf2c0b25c067e14bc438c1e676 (patch)
tree236343b5e718f6f88a88946c1b8a2c4697b790f8 /net/base/net_log_unittest.h
parent74e3af7013e7fb3ae9a9cbd98a7fcaf8469b1b0d (diff)
downloadchromium_src-34f40946dab92acf2c0b25c067e14bc438c1e676.zip
chromium_src-34f40946dab92acf2c0b25c067e14bc438c1e676.tar.gz
chromium_src-34f40946dab92acf2c0b25c067e14bc438c1e676.tar.bz2
clang/mac: Fix almost all problems when building all.xcodeproj.
BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_log_unittest.h')
-rw-r--r--net/base/net_log_unittest.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/base/net_log_unittest.h b/net/base/net_log_unittest.h
index 77a9cbd7..5e77275 100644
--- a/net/base/net_log_unittest.h
+++ b/net/base/net_log_unittest.h
@@ -28,7 +28,9 @@ inline ::testing::AssertionResult LogContainsEventHelper(
NetLog::EventType expected_event,
NetLog::EventPhase expected_phase) {
// Negative indices are reverse indices.
- size_t j = (i < 0) ? entries.size() + i : i;
+ size_t j = (i < 0) ?
+ static_cast<size_t>(static_cast<int>(entries.size()) + i) :
+ static_cast<size_t>(i);
if (j >= entries.size())
return ::testing::AssertionFailure() << j << " is out of bounds.";
const CapturingNetLog::Entry& entry = entries[j];
@@ -95,7 +97,9 @@ inline ::testing::AssertionResult LogContainsEntryWithType(
int i, // Negative indices are reverse indices.
NetLog::EventType type) {
// Negative indices are reverse indices.
- size_t j = (i < 0) ? entries.size() + i : i;
+ size_t j = (i < 0) ?
+ static_cast<size_t>(static_cast<int>(entries.size()) + i) :
+ static_cast<size_t>(i);
if (j >= entries.size())
return ::testing::AssertionFailure() << j << " is out of bounds.";
const CapturingNetLog::Entry& entry = entries[j];