diff options
| author | HampusM <hampus@hampusmat.com> | 2022-02-18 18:40:37 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2022-02-18 18:40:37 +0100 |
| commit | 3e4d91b6b029374813cfd0900db1fa8984ad7aa3 (patch) | |
| tree | e28fab22cc251047f5f20c7d1e1bf59a4cf5339e /src/conversion.hpp | |
| parent | d5612756b98afa43443a210722691c2e07ddfd5c (diff) | |
refactor: use string_view & improve argument parsing
Diffstat (limited to 'src/conversion.hpp')
| -rw-r--r-- | src/conversion.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conversion.hpp b/src/conversion.hpp index 460a3ac..6da7606 100644 --- a/src/conversion.hpp +++ b/src/conversion.hpp @@ -1,6 +1,6 @@ #pragma once -#include <string> +#include <string_view> constexpr unsigned int NUMBER_BASE = 10U; @@ -10,4 +10,4 @@ constexpr unsigned int NUMBER_BASE = 10U; * @param str A string that possibly is a unsigned integer * @returns A unsigned integer */ -unsigned int str_to_uint(std::string str); +unsigned int str_to_uint(std::string_view str); |
