aboutsummaryrefslogtreecommitdiff
path: root/src/conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversion.cpp')
-rw-r--r--src/conversion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conversion.cpp b/src/conversion.cpp
index b8fb942..71ba1b2 100644
--- a/src/conversion.cpp
+++ b/src/conversion.cpp
@@ -3,7 +3,7 @@
#include <climits>
#include <stdexcept>
-unsigned int str_to_uint(std::string str)
+unsigned int str_to_uint(std::string_view str)
{
if (str.at(0) == '-')
{
@@ -16,7 +16,7 @@ unsigned int str_to_uint(std::string str)
try
{
- num = std::stoul(str, &waste_pos, NUMBER_BASE);
+ num = std::stoul(str.data(), &waste_pos, NUMBER_BASE);
}
catch (const std::invalid_argument &exc)
{