Use std::string_view in input code

This commit is contained in:
Megamouse
2026-06-14 17:41:33 +02:00
parent 5bc128e085
commit 41a7cd29f8
14 changed files with 81 additions and 69 deletions
+1 -1
View File
@@ -757,7 +757,7 @@ void cfg::log_entry::from_default()
std::pair<u16, u16> cfg::device_info::get_usb_ids() const
{
auto string_to_hex = [](const std::string& str) -> u16
auto string_to_hex = [](std::string_view str) -> u16
{
u16 value = 0x0000;
if (!str.empty() && std::from_chars(str.data(), str.data() + str.size(), value, 16).ec != std::errc{})