Skip to content

Commit 4e5db52

Browse files
committed
Use raw string literals to avoid excessive escaping
1 parent 5e093de commit 4e5db52

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

alc/backends/dsound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ auto CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, voi
144144
auto *guidstr = LPOLESTR{};
145145
if(const auto hr = StringFromCLSID(*guid, &guidstr); SUCCEEDED(hr))
146146
{
147-
TRACE("Got device \"{}\", GUID \"{}\"", newentry.name, wstr_to_utf8(guidstr));
147+
TRACE(R"(Got device "{}", GUID "{}")", newentry.name, wstr_to_utf8(guidstr));
148148
CoTaskMemFree(guidstr);
149149
}
150150

alc/backends/jack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ void JackPlayback::start()
585585
return false;
586586
}
587587
if(jack_connect(mClient, jack_port_name(port), portname))
588-
ERR("Failed to connect output port \"{}\" to \"{}\"", jack_port_name(port),
588+
ERR(R"(Failed to connect output port "{}" to "{}")", jack_port_name(port),
589589
portname);
590590
return true;
591591
});

alc/backends/pulseaudio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class PulseMainloop {
395395

396396
const auto &newentry = PlaybackDevices.emplace_back(DevMap{std::move(newname),
397397
info->name, info->index});
398-
TRACE("Got device \"{}\", \"{}\" ({})", newentry.name, newentry.device_name,
398+
TRACE(R"(Got device "{}", "{}" ({}))", newentry.name, newentry.device_name,
399399
newentry.index);
400400

401401
const auto msg = std::format("Device added: {}", newentry.device_name);
@@ -424,7 +424,7 @@ class PulseMainloop {
424424

425425
const auto &newentry = CaptureDevices.emplace_back(DevMap{std::move(newname), info->name,
426426
info->index});
427-
TRACE("Got device \"{}\", \"{}\" ({})", newentry.name, newentry.device_name,
427+
TRACE(R"(Got device "{}", "{}" ({}))", newentry.name, newentry.device_name,
428428
newentry.index);
429429

430430
const auto msg = std::format("Device added: {}", newentry.device_name);

alc/backends/wasapi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ struct DeviceEnumHelper final : private IMMNotificationClient {
689689
newname = std::format("{} #{}", name, ++count);
690690
const auto &newentry = list.emplace_back(std::move(newname), std::move(guid), devid);
691691

692-
TRACE("Got device \"{}\", \"{}\", \"{}\"", newentry.name, newentry.endpoint_guid,
692+
TRACE(R"(Got device "{}", "{}", "{}")", newentry.name, newentry.endpoint_guid,
693693
wstr_to_utf8(newentry.devid));
694694
return true;
695695
}
@@ -758,7 +758,7 @@ struct DeviceEnumHelper final : private IMMNotificationClient {
758758
auto const iter = std::ranges::find(list, deviceId, &DevMap::devid);
759759
if(iter == list.end()) continue;
760760

761-
TRACE("Removing device \"{}\", \"{}\", \"{}\"", iter->name, iter->endpoint_guid,
761+
TRACE(R"(Removing device "{}", "{}", "{}")", iter->name, iter->endpoint_guid,
762762
wstr_to_utf8(iter->devid));
763763

764764
const auto msg = "Device removed: "+std::move(iter->name);

alc/panning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ auto InitHrtfPanning(al::Device *const device) -> std::unique_ptr<DirectHrtfStat
10661066
auto mode = std::string_view{*modeopt};
10671067
if(al::case_compare(mode, "basic"sv) == 0)
10681068
{
1069-
ERR("HRTF mode \"{}\" deprecated, substituting \"{}\"", *modeopt, "ambi2");
1069+
ERR(R"(HRTF mode "{}" deprecated, substituting "{}")", *modeopt, "ambi2");
10701070
mode = "ambi2";
10711071
}
10721072

core/helpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ auto GetProcBinary() -> const PathNamePair&
302302
else
303303
res.fname = pathname;
304304

305-
TRACE("Got binary: \"{}\", \"{}\"", res.path, res.fname);
305+
TRACE(R"(Got binary: "{}", "{}")", res.path, res.fname);
306306
return res;
307307
});
308308
return procbin;

0 commit comments

Comments
 (0)