From af8effe4f0876d6fa934806745712f679bd36278 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 24 Jan 2023 23:41:50 +0000 Subject: Replace getInt/getUInt/getFloat with type safe templated functions. --- src/modules/m_codepage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_codepage.cpp') diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index 1f5f2ac88..675255238 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -264,11 +264,11 @@ public: std::unique_ptr newcodepage = std::make_unique(); for (const auto& [_, tag] : ServerInstance->Config->ConfTags("cpchars")) { - unsigned long begin = tag->getUInt("begin", tag->getUInt("index", 0)); + unsigned long begin = tag->getNum("begin", tag->getNum("index", 0)); if (!begin) throw ModuleException(this, " tag without index or begin specified at " + tag->source.str()); - unsigned long end = tag->getUInt("end", begin); + unsigned long end = tag->getNum("end", begin); if (begin > end) throw ModuleException(this, " must be lower than at " + tag->source.str()); @@ -296,11 +296,11 @@ public: for (const auto& [_, tag] : ServerInstance->Config->ConfTags("cpcase")) { - unsigned long lower = tag->getUInt("lower", 0); + unsigned long lower = tag->getNum("lower", 0); if (!lower) throw ModuleException(this, " is required at " + tag->source.str()); - unsigned long upper = tag->getUInt("upper", 0); + unsigned long upper = tag->getNum("upper", 0); if (!upper) throw ModuleException(this, " is required at " + tag->source.str()); -- cgit v1.3.1-10-gc9f91