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); |
+} |