Skip to content

Commit

Permalink
util: Avoid using std::string_view::starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
Saancreed authored and jp7677 committed Feb 3, 2025
1 parent 05c5af7 commit 5c63f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/util_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace dxvk::str {
return false;

auto end = str.data() + str.size();
auto result = str.starts_with("0x") || str.starts_with("0X")
auto result = str.size() > 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')
? std::from_chars(str.data() + 2, end, value, 16)
: std::from_chars(str.data(), end, value, 10);

Expand Down

0 comments on commit 5c63f6d

Please sign in to comment.