summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-23 13:54:16 +0000
committerSadie Powell <sadie@witchery.services>2024-01-23 16:53:06 +0000
commit72acef4e159df5dcdb93b3c13b2f9d2e5e4c21a9 (patch)
treefc0a965612b45478e3b6f1566641df12790a818d /src
parenta6a0f6c44780c839b2269f4f29a26ecfdbd95544 (diff)
Mark types that have no inheritors as final.
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp2
-rw-r--r--src/main.cpp4
-rw-r--r--src/modes.cpp6
-rw-r--r--src/uplink.cpp2
-rw-r--r--src/win32/pthread/pthread.cpp2
-rw-r--r--src/win32/sigaction/sigaction.h2
-rw-r--r--src/win32/windows.cpp2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 6cb84020f..4b33eba8f 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -242,7 +242,7 @@ const Channel::ModeList &Channel::GetModes() const
}
template<typename F, typename S>
-struct second
+struct second final
{
S operator()(const std::pair<F, S> &p)
{
diff --git a/src/main.cpp b/src/main.cpp
index a9697395b..2f1f2ca91 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,7 +41,7 @@ time_t Anope::CurTime = time(NULL);
size_t Anope::CurrentUplink = -1;
-class UpdateTimer
+class UpdateTimer final
: public Timer
{
public:
@@ -53,7 +53,7 @@ public:
}
};
-class ExpireTimer
+class ExpireTimer final
: public Timer
{
public:
diff --git a/src/modes.cpp b/src/modes.cpp
index 0c64589d0..870081860 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -39,7 +39,7 @@ static std::vector<ChannelModeStatus *> ChannelModesByStatus;
/* Number of generic modes we support */
unsigned ModeManager::GenericChannelModes = 0, ModeManager::GenericUserModes = 0;
-struct StackerInfo
+struct StackerInfo final
{
/* Modes to be added */
std::list<std::pair<Mode *, Anope::string> > AddModes;
@@ -300,7 +300,7 @@ void StackerInfo::AddMode(Mode *mode, bool set, const Anope::string &param)
list->emplace_back(mode, param);
}
-static class ModePipe
+static class ModePipe final
: public Pipe
{
public:
@@ -580,7 +580,7 @@ const std::vector<ChannelModeStatus *> &ModeManager::GetStatusChannelModesByRank
return ChannelModesByStatus;
}
-static struct StatusSort
+static struct StatusSort final
{
bool operator()(ChannelModeStatus *cm1, ChannelModeStatus *cm2) const
{
diff --git a/src/uplink.cpp b/src/uplink.cpp
index cc5850ba1..087e5a476 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -17,7 +17,7 @@
UplinkSocket *UplinkSock = NULL;
-class ReconnectTimer
+class ReconnectTimer final
: public Timer
{
public:
diff --git a/src/win32/pthread/pthread.cpp b/src/win32/pthread/pthread.cpp
index 237f29dd4..971066d0e 100644
--- a/src/win32/pthread/pthread.cpp
+++ b/src/win32/pthread/pthread.cpp
@@ -8,7 +8,7 @@
#include "pthread.h"
-struct ThreadInfo
+struct ThreadInfo final
{
void *(*entry)(void *);
void *param;
diff --git a/src/win32/sigaction/sigaction.h b/src/win32/sigaction/sigaction.h
index 0492ca0e0..aee350d1c 100644
--- a/src/win32/sigaction/sigaction.h
+++ b/src/win32/sigaction/sigaction.h
@@ -18,7 +18,7 @@
# define SIGPIPE -1
#endif
-struct sigaction
+struct sigaction final
{
void (*sa_handler)(int);
int sa_flags;
diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp
index 54ce44202..ddbc20b77 100644
--- a/src/win32/windows.cpp
+++ b/src/win32/windows.cpp
@@ -18,7 +18,7 @@
#include <sys/types.h>
#include <fcntl.h>
-static struct WindowsLanguage
+static struct WindowsLanguage final
{
Anope::string languageName;
USHORT windowsLanguageName;