diff options
author | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
commit | a6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch) | |
tree | d4d1fded5c14350eb003a665ca8de500a0440cea /modules/commands/os_news.cpp | |
parent | 398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff) |
Improve the layout of types that inherit from another type.
Diffstat (limited to 'modules/commands/os_news.cpp')
-rw-r--r-- | modules/commands/os_news.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index 631c7abb5..e0c48de59 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -64,7 +64,8 @@ struct NewsMessages msgarray[] = { } }; -struct MyNewsItem : NewsItem +struct MyNewsItem + : NewsItem { void Serialize(Serialize::Data &data) const override { @@ -98,7 +99,8 @@ struct MyNewsItem : NewsItem } }; -class MyNewsService : public NewsService +class MyNewsService + : public NewsService { std::vector<NewsItem *> newsItems[3]; public: @@ -147,7 +149,8 @@ static const char **findmsgs(NewsType type) return NULL; } -class NewsBase : public Command +class NewsBase + : public Command { ServiceReference<NewsService> ns; @@ -296,7 +299,8 @@ public: bool OnHelp(CommandSource &source, const Anope::string &subcommand) override = 0; }; -class CommandOSLogonNews : public NewsBase +class CommandOSLogonNews + : public NewsBase { public: CommandOSLogonNews(Module *creator) : NewsBase(creator, "operserv/logonnews") @@ -323,7 +327,8 @@ public: } }; -class CommandOSOperNews : public NewsBase +class CommandOSOperNews + : public NewsBase { public: CommandOSOperNews(Module *creator) : NewsBase(creator, "operserv/opernews") @@ -350,7 +355,8 @@ public: } }; -class CommandOSRandomNews : public NewsBase +class CommandOSRandomNews + : public NewsBase { public: CommandOSRandomNews(Module *creator) : NewsBase(creator, "operserv/randomnews") @@ -376,7 +382,8 @@ public: static unsigned cur_rand_news = 0; -class OSNews : public Module +class OSNews + : public Module { MyNewsService newsservice; Serialize::Type newsitem_type; |