Index: compiled/subscription/UserDefinedSubscription.cpp |
=================================================================== |
--- a/compiled/subscription/UserDefinedSubscription.cpp |
+++ b/compiled/subscription/UserDefinedSubscription.cpp |
@@ -47,60 +47,60 @@ namespace |
); |
} |
UserDefinedSubscription::UserDefinedSubscription(const String& id) |
: Subscription(Type::USERDEFINED, id), mDefaults(0) |
{ |
} |
-bool UserDefinedSubscription::IsDefaultFor(const Filter* filter) const |
+bool UserDefinedSubscription::IsDefaultFor(const Filter& filter) const |
{ |
- if (filter->mType >= Filter::Type::VALUE_COUNT) |
+ if (filter.mType >= Filter::Type::VALUE_COUNT) |
{ |
assert(false, "Filter type exceeds valid range"); |
abort(); |
} |
- return mDefaults & filterTypeToCategory[filter->mType]; |
+ return mDefaults & filterTypeToCategory[filter.mType]; |
} |
-void UserDefinedSubscription::MakeDefaultFor(const Filter* filter) |
+void UserDefinedSubscription::MakeDefaultFor(const Filter& filter) |
{ |
- if (filter->mType >= Filter::Type::VALUE_COUNT) |
+ if (filter.mType >= Filter::Type::VALUE_COUNT) |
{ |
assert(false, "Filter type exceeds valid range"); |
abort(); |
} |
- mDefaults |= filterTypeToCategory[filter->mType]; |
+ mDefaults |= filterTypeToCategory[filter.mType]; |
} |
-void UserDefinedSubscription::InsertFilterAt(Filter* filter, unsigned pos) |
+void UserDefinedSubscription::InsertFilterAt(Filter& filter, unsigned pos) |
{ |
if (pos >= mFilters.size()) |
pos = mFilters.size(); |
- mFilters.emplace(mFilters.begin() + pos, filter); |
+ mFilters.emplace(mFilters.begin() + pos, &filter); |
if (GetListed()) |
{ |
- FilterNotifier::FilterChange(FilterNotifier::Topic::FILTER_ADDED, filter, this, |
- pos); |
+ FilterNotifier::FilterChange(FilterNotifier::Topic::FILTER_ADDED, filter, |
+ this, pos); |
} |
} |
bool UserDefinedSubscription::RemoveFilterAt(unsigned pos) |
{ |
if (pos >= mFilters.size()) |
return false; |
FilterPtr filter(mFilters[pos]); |
mFilters.erase(mFilters.begin() + pos); |
if (GetListed()) |
{ |
FilterNotifier::FilterChange(FilterNotifier::Topic::FILTER_REMOVED, |
- filter.get(), this, pos); |
+ *filter.get(), this, pos); |
} |
return true; |
} |
OwnedString UserDefinedSubscription::Serialize() const |
{ |
OwnedString result(Subscription::Serialize()); |
if (!IsGeneric()) |