diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index d2464974..c65962da 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -661,8 +661,9 @@ ByteVector::ReverseIterator ByteVector::rbegin() ByteVector::ConstReverseIterator ByteVector::rbegin() const { - // we need a const reference to the data vector so we can ensure the const version of rbegin() is called - const std::vector &v = d->data->data; + // Workaround for the Solaris Studio 12.4 compiler. + // We need a const reference to the data vector so we can ensure the const version of rbegin() is called. + const std::vector &v = *d->data; return v.rbegin() + (v.size() - (d->offset + d->length)); } @@ -674,8 +675,9 @@ ByteVector::ReverseIterator ByteVector::rend() ByteVector::ConstReverseIterator ByteVector::rend() const { - // we need a const reference to the data vector so we can ensure the const version of rbegin() is called - const std::vector &v = d->data->data; + // Workaround for the Solaris Studio 12.4 compiler. + // We need a const reference to the data vector so we can ensure the const version of rbegin() is called. + const std::vector &v = *d->data; return v.rbegin() + (v.size() - d->offset); }