diff options
author | HampusM <hampus@hampusmat.com> | 2022-01-24 22:33:31 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-01-24 22:33:31 +0100 |
commit | 9f685c302a52f0801ca2f03fc03db3cae61ad3e9 (patch) | |
tree | be8fa4549a887afb7ac914944bed630cca397b2c /src/utils.cpp | |
parent | b8d9da4884a74008e0c70bc8d907df618fc6d998 (diff) |
refactor: fix compiler warnings
Diffstat (limited to 'src/utils.cpp')
-rw-r--r-- | src/utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<unsigned int>(num); } |