From 64c9e384eff92fe2ef01d59f6fc6853ef0168278 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 16 Mar 2025 09:26:15 +0100 Subject: [PATCH] refactor(pcmaudio): modernize ID comparison --- src/writer/categorizer/pcmaudio_categorizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/writer/categorizer/pcmaudio_categorizer.cpp b/src/writer/categorizer/pcmaudio_categorizer.cpp index dbbefdc0..341a893b 100644 --- a/src/writer/categorizer/pcmaudio_categorizer.cpp +++ b/src/writer/categorizer/pcmaudio_categorizer.cpp @@ -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 {