refactor(pcmaudio): modernize ID comparison

This commit is contained in:
Marcus Holland-Moritz 2025-03-16 09:26:15 +01:00
parent 39d2b53fba
commit 64c9e384ef

View File

@ -297,9 +297,9 @@ class iff_parser final {
ChunkHeaderType header;
size_t pos;
bool is(std::string_view id) const {
assert(sizeof(header.id) == id.size());
return std::memcmp(header.id, id.data(), sizeof(header.id)) == 0;
bool is(std::string_view ident) const {
assert(sizeof(header.id) == ident.size());
return ident == this->id();
}
std::string_view id() const {