diff options
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); } |