Use C++20. (#2322)
This commit is contained in:
parent
9288775351
commit
7fb8c76590
16 changed files with 29 additions and 16 deletions
|
|
@ -262,7 +262,7 @@ namespace cuda {
|
|||
fs::path sysfs_dir { sysfs_path };
|
||||
for (auto &entry : fs::directory_iterator { sysfs_dir }) {
|
||||
auto file = entry.path().filename();
|
||||
auto filestring = file.generic_u8string();
|
||||
auto filestring = file.generic_string();
|
||||
if (std::string_view { filestring }.substr(0, 4) != "card"sv) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1049,4 +1049,4 @@ namespace platf {
|
|||
|
||||
return display_names;
|
||||
}
|
||||
} // namespace platf
|
||||
} // namespace platf
|
||||
|
|
|
|||
|
|
@ -1510,7 +1510,7 @@ namespace platf {
|
|||
std::stringstream ss;
|
||||
ss << std::hex << std::setfill('0');
|
||||
for (const auto &ch : str) {
|
||||
ss << ch;
|
||||
ss << static_cast<uint_least32_t>(ch);
|
||||
}
|
||||
|
||||
std::string hex_unicode(ss.str());
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ namespace platf {
|
|||
for (auto &entry : fs::directory_iterator { card_dir }) {
|
||||
auto file = entry.path().filename();
|
||||
|
||||
auto filestring = file.generic_u8string();
|
||||
auto filestring = file.generic_string();
|
||||
if (filestring.size() < 4 || std::string_view { filestring }.substr(0, 4) != "card"sv) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1641,7 +1641,7 @@ namespace platf {
|
|||
for (auto &entry : fs::directory_iterator { card_dir }) {
|
||||
auto file = entry.path().filename();
|
||||
|
||||
auto filestring = file.generic_u8string();
|
||||
auto filestring = file.generic_string();
|
||||
if (std::string_view { filestring }.substr(0, 4) != "card"sv) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue