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

Unified Diff: src/engine/Main.cpp

Issue 4806567450902528: Issue 1794 - add handling of std::vector<std::string> by Communication::{Input,Output}Buffer (Closed)
Patch Set: remove WriteStrings and ReadStrings Created Feb. 9, 2015, 2:04 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/plugin/AdblockPlusClient.cpp » ('j') | src/plugin/AdblockPlusClient.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/engine/Main.cpp
diff --git a/src/engine/Main.cpp b/src/engine/Main.cpp
index 11ddf7eb13f0837c5bfeba071d9f3c9af1480bb8..52efdaf788dae06e26b1bd3cbb5e1ddcbb3fddae 100644
--- a/src/engine/Main.cpp
+++ b/src/engine/Main.cpp
@@ -23,15 +23,6 @@ namespace
CriticalSection activeConnectionsLock;
HWND callbackWindow;
- void WriteStrings(Communication::OutputBuffer& response,
- const std::vector<std::string>& strings)
- {
- int32_t count = static_cast<int32_t>(strings.size());
- response << count;
- for (int32_t i = 0; i < count; i++)
- response << strings[i];
- }
-
void WriteSubscriptions(Communication::OutputBuffer& response,
const std::vector<AdblockPlus::SubscriptionPtr>& subscriptions)
{
@@ -101,7 +92,7 @@ namespace
{
std::string domain;
request >> domain;
- WriteStrings(response, filterEngine->GetElementHidingSelectors(domain));
+ response << filterEngine->GetElementHidingSelectors(domain);
break;
}
case Communication::PROC_AVAILABLE_SUBSCRIPTIONS:
@@ -186,7 +177,7 @@ namespace
}
}
- WriteStrings(response, domains);
+ response << domains;
break;
}
case Communication::PROC_IS_WHITELISTED_URL:
« no previous file with comments | « no previous file | src/plugin/AdblockPlusClient.cpp » ('j') | src/plugin/AdblockPlusClient.cpp » ('J')

Powered by Google App Engine
This is Rietveld