Index: shell/src/FiltersCommand.cpp |
=================================================================== |
--- a/shell/src/FiltersCommand.cpp |
+++ b/shell/src/FiltersCommand.cpp |
@@ -17,25 +17,25 @@ |
#include <iostream> |
#include <sstream> |
#include "FiltersCommand.h" |
namespace |
{ |
- typedef std::vector<AdblockPlus::FilterPtr> FilterList; |
+ typedef std::vector<AdblockPlus::Filter> FilterList; |
void ShowFilterList(const FilterList& filters) |
{ |
for (FilterList::const_iterator it = filters.begin(); |
it != filters.end(); it++) |
{ |
std::string type; |
- switch ((*it)->GetType()) |
+ switch (it->GetType()) |
{ |
case AdblockPlus::Filter::TYPE_BLOCKING: |
type = "blocking"; |
break; |
case AdblockPlus::Filter::TYPE_EXCEPTION: |
type = "exception"; |
break; |
case AdblockPlus::Filter::TYPE_ELEMHIDE: |
@@ -49,17 +49,17 @@ |
break; |
case AdblockPlus::Filter::TYPE_INVALID: |
type = "invalid"; |
break; |
default: |
type = "(unknown type)"; |
break; |
} |
- std::cout << (*it)->GetProperty("text").AsString() << " - " << |
+ std::cout << it->GetProperty("text").AsString() << " - " << |
type << std::endl; |
} |
} |
} |
FiltersCommand::FiltersCommand(AdblockPlus::FilterEngine& filterEngine) |
: Command("filters"), filterEngine(filterEngine) |
{ |
@@ -110,22 +110,22 @@ |
void FiltersCommand::ShowFilters() |
{ |
ShowFilterList(filterEngine.GetListedFilters()); |
} |
void FiltersCommand::AddFilter(const std::string& text) |
{ |
- AdblockPlus::FilterPtr filter = filterEngine.GetFilter(text); |
- filter->AddToList(); |
+ AdblockPlus::Filter filter = filterEngine.GetFilter(text); |
+ filter.AddToList(); |
} |
void FiltersCommand::RemoveFilter(const std::string& text) |
{ |
- AdblockPlus::FilterPtr filter = filterEngine.GetFilter(text); |
- if (!filter->IsListed()) |
+ AdblockPlus::Filter filter = filterEngine.GetFilter(text); |
+ if (!filter.IsListed()) |
{ |
std::cout << "No such filter '" << text << "'" << std::endl; |
return; |
} |
- filter->RemoveFromList(); |
+ filter.RemoveFromList(); |
} |