From 2cdd31173504ee0fecdb2ce56c2f4f893e4b0a7b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 16 Nov 2021 18:49:08 +0000 Subject: Document ConnectClass and reorder it to avoid unnecessary padding. --- src/users.cpp | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4e91c31d1..1ec7d9423 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1259,23 +1259,23 @@ const std::string& FakeUser::GetFullRealHost() ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask) : config(tag) + , host(mask) + , name("unnamed") , type(t) , fakelag(true) - , name("unnamed") - , registration_timeout(0) - , host(mask) - , pingtime(0) - , softsendqmax(0) - , hardsendqmax(0) - , recvqmax(0) - , penaltythreshold(0) - , commandrate(0) - , maxlocal(0) - , maxglobal(0) , maxconnwarn(true) + , resolvehostnames(true) , maxchans(0) + , penaltythreshold(0) + , pingtime(0) + , registration_timeout(0) + , commandrate(0) + , hardsendqmax(0) , limit(0) - , resolvehostnames(true) + , maxglobal(0) + , maxlocal(0) + , recvqmax(0) + , softsendqmax(0) { irc::spacesepstream hoststream(host); for (std::string hostentry; hoststream.GetToken(hostentry); ) @@ -1322,25 +1322,25 @@ ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask, cons void ConnectClass::Update(const ConnectClass* src) { config = src->config; - type = src->type; - fakelag = src->fakelag; - name = src->name; - registration_timeout = src->registration_timeout; host = src->host; hosts = src->hosts; - pingtime = src->pingtime; - softsendqmax = src->softsendqmax; - hardsendqmax = src->hardsendqmax; - recvqmax = src->recvqmax; - penaltythreshold = src->penaltythreshold; - commandrate = src->commandrate; - maxlocal = src->maxlocal; - maxglobal = src->maxglobal; + name = src->name; + password = src->password; + passwordhash = src->passwordhash; + ports = src->ports; + type = src->type; + fakelag = src->fakelag; maxconnwarn = src->maxconnwarn; + resolvehostnames = src->resolvehostnames; maxchans = src->maxchans; + penaltythreshold = src->penaltythreshold; + pingtime = src->pingtime; + registration_timeout = src->registration_timeout; + commandrate = src->commandrate; + hardsendqmax = src->hardsendqmax; limit = src->limit; - resolvehostnames = src->resolvehostnames; - ports = src->ports; - password = src->password; - passwordhash = src->passwordhash; + maxglobal = src->maxglobal; + maxlocal = src->maxlocal; + recvqmax = src->recvqmax; + softsendqmax = src->softsendqmax; } -- cgit v1.3.1-10-gc9f91