From 9f685c302a52f0801ca2f03fc03db3cae61ad3e9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 24 Jan 2022 22:33:31 +0100 Subject: refactor: fix compiler warnings --- src/utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils.cpp') diff --git a/src/utils.cpp b/src/utils.cpp index 30ff4ec..480c31f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -27,8 +27,8 @@ unsigned int str_to_uint(std::string str) if (waste_pos != str.length()) throw "Not a number"; - if (num > (unsigned long)UINT_MAX) + if (num > UINT_MAX) throw "Out of range"; - return (unsigned int)num; + return static_cast(num); } -- cgit v1.2.3-18-g5258