Tracktion / choc

A collection of header only classes, permissively licensed, to provide basic useful tasks with the bare-minimum of dependencies.
Other
540 stars 49 forks source link

Compile error in `midi::Message` #57

Closed chrhaase closed 3 months ago

chrhaase commented 3 months ago

I got an error when instantiating the equality operator. Changing the implementation to something like

template <typename StorageType>
template <typename OtherStorage>
bool Message<StorageType>::operator== (const Message<OtherStorage>& other) const
{
    auto len1 = size();
    auto len2 = other.size();
    return len1 == len2 && memcmp (data(), other.data(), len1) == 0;
}

fixes it.

julianstorer commented 3 months ago

Ah, thanks for the heads-up - yes, looks like a typo, I'll push a fix!

chrhaase commented 3 months ago

Great, thanks!