summaryrefslogtreecommitdiff
path: root/Applications/ChanViewer
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-05 11:11:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-05 11:19:00 +0200
commit1d468ed6d32675e6a48a62ce7e3ea2a15b9ca777 (patch)
tree0802da0fb4127bd1f44656408df10361c59d0743 /Applications/ChanViewer
parent058c614110da17336fdf0f4204bc9c030b3821ce (diff)
downloadserenity-1d468ed6d32675e6a48a62ce7e3ea2a15b9ca777.zip
AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr
We were allowing this dangerous kind of thing: RefPtr<Base> base; RefPtr<Derived> derived = base; This patch changes the {Nonnull,}RefPtr constructors so this is no longer possible. To downcast one of these pointers, there is now static_ptr_cast<T>: RefPtr<Derived> derived = static_ptr_cast<Derived>(base); Fixing this exposed a ton of cowboy-downcasts in various places, which we're now forced to fix. :^)
Diffstat (limited to 'Applications/ChanViewer')
-rw-r--r--Applications/ChanViewer/BoardListModel.h2
-rw-r--r--Applications/ChanViewer/ThreadCatalogModel.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Applications/ChanViewer/BoardListModel.h b/Applications/ChanViewer/BoardListModel.h
index 6ee6a0bfc7..6c5f158aa3 100644
--- a/Applications/ChanViewer/BoardListModel.h
+++ b/Applications/ChanViewer/BoardListModel.h
@@ -51,5 +51,5 @@ private:
BoardListModel();
JsonArray m_boards;
- RefPtr<Core::HttpJob> m_pending_job;
+ RefPtr<Core::NetworkJob> m_pending_job;
};
diff --git a/Applications/ChanViewer/ThreadCatalogModel.h b/Applications/ChanViewer/ThreadCatalogModel.h
index 661e3160e5..8ab4046ca1 100644
--- a/Applications/ChanViewer/ThreadCatalogModel.h
+++ b/Applications/ChanViewer/ThreadCatalogModel.h
@@ -63,5 +63,5 @@ private:
String m_board { "g" };
JsonArray m_catalog;
- RefPtr<Core::HttpJob> m_pending_job;
+ RefPtr<Core::NetworkJob> m_pending_job;
};