]> granicus.if.org Git - taglib/commitdiff
Add a TODO comment in ByteVector::replace().
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Thu, 18 Feb 2016 05:29:17 +0000 (14:29 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Thu, 18 Feb 2016 05:29:17 +0000 (14:29 +0900)
taglib/toolkit/tbytevector.cpp

index 22ce2d4fdbaf383ad71caaac7bf6cb8ce552a620..62f0fbef02774b1e54f1c8a18f29b33a86608311 100644 (file)
@@ -489,6 +489,8 @@ ByteVector &ByteVector::replace(char oldByte, char newByte)
 
 ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &with)
 {
+  // TODO: This takes O(n!) time in the worst case. Rewrite it to run in O(n) time.
+
   if(pattern.size() == 0 || pattern.size() > size())
     return *this;