From 43a5dccec1a35f9078e251a2b2ea8615d171e70c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 17 Sep 2013 09:17:12 +0000 Subject: [PATCH] Fix windows 64-bit compile errors (issue #1079). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1448 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tests/unittests/request_unittest.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/unittests/request_unittest.cc b/tests/unittests/request_unittest.cc index 92c4ae655..00836a9ab 100644 --- a/tests/unittests/request_unittest.cc +++ b/tests/unittests/request_unittest.cc @@ -237,7 +237,9 @@ class TypeExpectations { explicit TypeExpectations(bool navigation) : navigation_(navigation) { // Build the map of relevant requests. - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (navigation_ && g_type_expected[i].navigation != navigation_) continue; @@ -279,7 +281,9 @@ class TypeExpectations { // Test if all expectations have been met. bool IsDone(bool assert) { - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (navigation_ && g_type_expected[i].navigation != navigation_) continue; @@ -304,7 +308,9 @@ class TypeExpectations { int GetExpectedIndex(const std::string& file, cef_transition_type_t transition_type, cef_resource_type_t resource_type) { - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (g_type_expected[i].file == file && (!navigation_ || g_type_expected[i].navigation == navigation_) && g_type_expected[i].transition_type == transition_type &&