From 0c8b381a46e6f95d18a517286d9625d86c9733a1 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 28 Jan 2014 16:58:44 +0000 Subject: [PATCH] Windows: Fix 64-bit compile errors (issue #1184). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1576 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef_dll/wrapper/cef_message_router.cc | 10 ++++++---- tests/unittests/message_router_unittest.cc | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libcef_dll/wrapper/cef_message_router.cc b/libcef_dll/wrapper/cef_message_router.cc index 1a231a4fb..24be8fca1 100644 --- a/libcef_dll/wrapper/cef_message_router.cc +++ b/libcef_dll/wrapper/cef_message_router.cc @@ -222,9 +222,10 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide { return visitor.count(); } else if (browser.get()) { - return browser_query_info_map_.size(browser->GetIdentifier()); + return static_cast( + browser_query_info_map_.size(browser->GetIdentifier())); } else { - return browser_query_info_map_.size(); + return static_cast(browser_query_info_map_.size()); } return 0; @@ -776,9 +777,10 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide { return visitor.count(); } else if (browser.get()) { - return browser_request_info_map_.size(browser->GetIdentifier()); + return static_cast( + browser_request_info_map_.size(browser->GetIdentifier())); } else { - return browser_request_info_map_.size(); + return static_cast(browser_request_info_map_.size()); } return 0; diff --git a/tests/unittests/message_router_unittest.cc b/tests/unittests/message_router_unittest.cc index 5ef5c5234..9ac763b50 100644 --- a/tests/unittests/message_router_unittest.cc +++ b/tests/unittests/message_router_unittest.cc @@ -2238,7 +2238,8 @@ class MultiQueryManagerMap : EXPECT_EQ(it, manager_map_.end()); MultiQueryManager* manager = - new MultiQueryManager(url, synchronous, manager_map_.size() * 1000); + new MultiQueryManager(url, synchronous, + static_cast(manager_map_.size()) * 1000); manager->AddObserver(this); manager_map_.insert(std::make_pair(url, manager)); @@ -2408,8 +2409,8 @@ class MultiQueryManagerMap : static std::string GetNameForURL(const std::string& url) { // Extract the file name without extension. - int pos1 = url.rfind("/"); - int pos2 = url.rfind("."); + int pos1 = static_cast(url.rfind("/")); + int pos2 = static_cast(url.rfind(".")); EXPECT_TRUE(pos1 >= 0 && pos2 >= 0 && pos1 < pos2); return url.substr(pos1 + 1, pos2 - pos1 - 1); }