From 02340285c564a7e82105137192d46d554a6fce3a Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Sun, 30 May 2021 20:37:54 +0100 Subject: Added -Wshorten-64-to-32 and fixed all warnings. --- src/modules/m_customprefix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_customprefix.cpp') diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index aa71fd3c1..487b71060 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -31,9 +31,9 @@ class CustomPrefixMode : public PrefixMode : PrefixMode(parent, Name, Letter, 0, Prefix) , tag(Tag) { - unsigned long rank = tag->getUInt("rank", 0, 0, UINT_MAX); - unsigned long setrank = tag->getUInt("ranktoset", prefixrank, rank, UINT_MAX); - unsigned long unsetrank = tag->getUInt("ranktounset", setrank, setrank, UINT_MAX); + unsigned int rank = static_cast(tag->getUInt("rank", 0, 0, UINT_MAX)); + unsigned int setrank = static_cast(tag->getUInt("ranktoset", prefixrank, rank, UINT_MAX)); + unsigned int unsetrank = static_cast(tag->getUInt("ranktounset", setrank, setrank, UINT_MAX)); bool depriv = tag->getBool("depriv", true); this->Update(rank, setrank, unsetrank, depriv); @@ -71,9 +71,9 @@ class ModuleCustomPrefix : public Module if (!pm) throw ModuleException(" specified for a non-prefix mode at " + tag->source.str()); - unsigned long rank = tag->getUInt("rank", pm->GetPrefixRank(), 0, UINT_MAX); - unsigned long setrank = tag->getUInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX); - unsigned long unsetrank = tag->getUInt("ranktounset", pm->GetLevelRequired(false), setrank, UINT_MAX); + unsigned int rank = static_cast(tag->getUInt("rank", pm->GetPrefixRank(), 0, UINT_MAX)); + unsigned int setrank = static_cast(tag->getUInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX)); + unsigned int unsetrank = static_cast(tag->getUInt("ranktounset", pm->GetLevelRequired(false), setrank, UINT_MAX)); bool depriv = tag->getBool("depriv", pm->CanSelfRemove()); pm->Update(rank, setrank, unsetrank, depriv); -- cgit v1.3.1-10-gc9f91