Skip to content

Commit

Permalink
core: try different types
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Nov 12, 2024
1 parent f27c3ee commit 4998b7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mavsdk/core/fs_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ std::optional<std::filesystem::path> create_tmp_directory(const std::string& pre
std::string replace_non_ascii_and_whitespace(const std::string& input)
{
std::string result = input;
std::transform(result.begin(), result.end(), result.begin(), [](const char ch) {
if (ch < 0 || static_cast<unsigned char>(ch) > 127 || std::isspace(ch)) {
std::transform(result.begin(), result.end(), result.begin(), [](unsigned char ch) {
if (ch > 127 || std::isspace(ch)) {
return '_';
}
return ch;
return static_cast<char>(ch);
});
return result;
}
Expand Down

0 comments on commit 4998b7d

Please sign in to comment.