| Index: src/plugin/AdblockPlusClient.cpp |
| diff --git a/src/plugin/AdblockPlusClient.cpp b/src/plugin/AdblockPlusClient.cpp |
| index 922f3451e6979f4e60d3fdc6d4df02762465d28c..8f89c161641db37545ce082c6e50d8431c1b7847 100644 |
| --- a/src/plugin/AdblockPlusClient.cpp |
| +++ b/src/plugin/AdblockPlusClient.cpp |
| @@ -108,21 +108,6 @@ namespace |
| } |
| } |
| - std::vector<std::wstring> ReadStrings(Communication::InputBuffer& message) |
| - { |
| - int32_t count; |
| - message >> count; |
| - |
| - std::vector<std::wstring> result; |
| - for (int32_t i = 0; i < count; i++) |
| - { |
| - std::string str; |
| - message >> str; |
| - result.push_back(ToUtf16String(str)); |
| - } |
| - return result; |
| - } |
| - |
| std::vector<SubscriptionDescription> ReadSubscriptions(Communication::InputBuffer& message) |
| { |
| int32_t count; |
| @@ -309,7 +294,10 @@ std::vector<std::wstring> CAdblockPlusClient::GetElementHidingSelectors(const st |
| Communication::InputBuffer response; |
| if (!CallEngine(request, response)) |
| return std::vector<std::wstring>(); |
| - return ReadStrings(response); |
| + |
| + std::vector<std::string> selectors; |
| + response >> selectors; |
| + return ToUtf16Strings(selectors); |
|
Eric
2015/02/09 16:18:57
Here and below, you're following a call to operato
|
| } |
| std::vector<SubscriptionDescription> CAdblockPlusClient::FetchAvailableSubscriptions() |
| @@ -375,7 +363,10 @@ std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() |
| Communication::InputBuffer response; |
| if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS, response)) |
| return std::vector<std::wstring>(); |
| - return ReadStrings(response); |
| + |
| + std::vector<std::string> domains; |
| + response >> domains; |
| + return ToUtf16Strings(domains); |
|
Eric
2015/02/09 16:18:57
Second pair of calls: operator>>, ToUtf16Strings
|
| } |
| bool CAdblockPlusClient::IsFirstRun() |