Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/engine/Main.cpp

Issue 11449051: Fix 64-bit conversion errors (Closed)
Patch Set: Created Aug. 16, 2013, 2:56 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/engine/UpdateInstallDialog.cpp » ('j') | src/plugin/PluginClass.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/engine/Main.cpp
===================================================================
--- a/src/engine/Main.cpp
+++ b/src/engine/Main.cpp
@@ -22,7 +22,7 @@
void WriteStrings(Communication::OutputBuffer& response,
const std::vector<std::string>& strings)
{
- int32_t count = strings.size();
+ int32_t count = static_cast<int32_t>(strings.size());
response << count;
for (int32_t i = 0; i < count; i++)
response << strings[i];
@@ -31,7 +31,7 @@
void WriteSubscriptions(Communication::OutputBuffer& response,
const std::vector<AdblockPlus::SubscriptionPtr>& subscriptions)
{
- int32_t count = subscriptions.size();
+ int32_t count = static_cast<int32_t>(subscriptions.size());
response << count;
for (int32_t i = 0; i < count; i++)
{
@@ -136,8 +136,8 @@
//@@||example.com^$document
const char prefix[] = "@@||";
const char suffix[] = "^$document";
- const int prefixLen = strlen(prefix);
- const int suffixLen = strlen(suffix);
+ const size_t prefixLen = strlen(prefix);
+ const size_t suffixLen = strlen(suffix);
if (!text.compare(0, prefixLen, prefix) &&
!text.compare(text.size() - suffixLen, suffixLen, suffix))
{
« no previous file with comments | « no previous file | src/engine/UpdateInstallDialog.cpp » ('j') | src/plugin/PluginClass.cpp » ('J')

Powered by Google App Engine
This is Rietveld