*: let libfmt quote strings

This commit is contained in:
Max Kellermann
2024-04-16 11:06:34 +02:00
parent 39c9e92f42
commit 0c1ecc96a8
71 changed files with 160 additions and 160 deletions

View File

@@ -33,7 +33,7 @@ output_mixer_get_volume(const AudioOutputControl &ao) noexcept
return mixer->LockGetVolume();
} catch (...) {
FmtError(mixer_domain,
"Failed to read mixer for '{}': {}",
"Failed to read mixer for {:?}: {}",
ao.GetName(), std::current_exception());
return -1;
}
@@ -88,9 +88,9 @@ output_mixer_set_volume(AudioOutputControl &ao, unsigned volume)
return SetVolumeResult::OK;
} catch (...) {
FmtError(mixer_domain,
"Failed to set mixer for '{}': {}",
"Failed to set mixer for {:?}: {}",
ao.GetName(), std::current_exception());
std::throw_with_nested(std::runtime_error(FmtBuffer<256>("Failed to set mixer for '{}'",
std::throw_with_nested(std::runtime_error(FmtBuffer<256>("Failed to set mixer for {:?}",
ao.GetName())));
}
}

View File

@@ -108,7 +108,7 @@ OssMixer::Open()
throw MakeErrno("READ_DEVMASK failed");
if (((1 << volume_control) & devmask) == 0)
throw FmtErrno("mixer control \"{}\" not usable",
throw FmtErrno("mixer control {:?} not usable",
control);
}
} catch (...) {
@@ -134,8 +134,8 @@ OssMixer::GetVolume()
if (left != right) {
FmtWarning(oss_mixer_domain,
"volume for left and right is not the same, \"{}\" and "
"\"{}\"\n", left, right);
"volume for left and right is not the same, {:?} and "
"{:?}\n", left, right);
}
return left;

View File

@@ -161,7 +161,7 @@ parse_volume_scale_factor(const char *value) {
float factor = ParseFloat(value, &endptr);
if (endptr == value || *endptr != '\0' || factor < 0.5f || factor > 5.0f)
throw FmtRuntimeError("\"{}\" is not a number in the "
throw FmtRuntimeError("{:?} is not a number in the "
"range 0.5 to 5.0",
value);