]> granicus.if.org Git - taglib/commitdiff
Consistent notations between ByteVector::data() and at().
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 26 Aug 2015 07:38:06 +0000 (16:38 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Thu, 19 Nov 2015 00:23:20 +0000 (09:23 +0900)
taglib/toolkit/tbytevector.cpp

index 636a1a342bd4eddaa4320ce3ba5efd4ad75d8a6f..d246497476e8f571527395e71f8a1f99e49c2c2f 100644 (file)
@@ -451,12 +451,12 @@ ByteVector &ByteVector::setData(const char *data)
 char *ByteVector::data()
 {
   detach();
-  return (size() > 0) ? (&d->data->front() + d->offset) : 0;
+  return (size() > 0) ? (&(*d->data)[d->offset]) : 0;
 }
 
 const char *ByteVector::data() const
 {
-  return (size() > 0) ? (&d->data->front() + d->offset) : 0;
+  return (size() > 0) ? (&(*d->data)[d->offset]) : 0;
 }
 
 ByteVector ByteVector::mid(uint index, uint length) const