PTAL (the CI failure seems unrelated)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM overall
StrCat(
{"({output=[index:", String::Number(output_index),
", type:", Handler().NodeTypeName(), ", handler:0x",
String::Format("%" PRIXPTR, reinterpret_cast<uintptr_t>(&Handler())),
"]} --> {input=[index:", String::Number(input_index),
", type:", destination->Handler().NodeTypeName(), ", handler:0x",
String::Format("%" PRIXPTR,
reinterpret_cast<uintptr_t>(&destination->Handler())),
"]})"}));Can we consider using `StringBuilder` here to make it more readable?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
LGTM overall
Thank you!
StrCat(
{"({output=[index:", String::Number(output_index),
", type:", Handler().NodeTypeName(), ", handler:0x",
String::Format("%" PRIXPTR, reinterpret_cast<uintptr_t>(&Handler())),
"]} --> {input=[index:", String::Number(input_index),
", type:", destination->Handler().NodeTypeName(), ", handler:0x",
String::Format("%" PRIXPTR,
reinterpret_cast<uintptr_t>(&destination->Handler())),
"]})"}));Can we consider using `StringBuilder` here to make it more readable?
StringBuilder may have to reallocate when appending the results, which would be worse for performance. StrCat can pre-compute the size and perform a single allocation. Thus, for performance reasons, I prefer to keep this as StrCat.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[WebAudio/MIDI] String return types, use StrCat not String::Format
Returning const String is an anti-pattern because it prevents eliding
copies. By using StrCat we can return const char* in functions called
by the logging functions and avoid these additional copies. Similarly,
returning class members by const reference (not just const) can avoid
copies in some cases.
This should cause no functional change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |