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

Unified Diff: compiled/subscription/DownloadableSubscription.h

Issue 29426559: Issue 5137 - [emscripten] Added basic filter storage implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Fixed some inconsistencies Created May 3, 2017, 8:25 a.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
Index: compiled/subscription/DownloadableSubscription.h
===================================================================
--- a/compiled/subscription/DownloadableSubscription.h
+++ b/compiled/subscription/DownloadableSubscription.h
@@ -48,8 +48,17 @@ public:
GetDataRevision, SetDataRevision);
SUBSCRIPTION_STRING_PROPERTY(mRequiredVersion, NONE,
GetRequiredVersion, SetRequiredVersion);
SUBSCRIPTION_PROPERTY(int, mDownloadCount, NONE,
GetDownloadCount, SetDownloadCount);
EMSCRIPTEN_KEEPALIVE OwnedString Serialize() const;
};
+
+template<>
+inline DownloadableSubscription* Subscription::As<DownloadableSubscription>()
+{
+ if (mType != Type::DOWNLOADABLE)
+ return nullptr;
+
+ return static_cast<DownloadableSubscription*>(this);
+}

Powered by Google App Engine
This is Rietveld