Add a TODO comment in ByteVector::replace().

This commit is contained in:
Tsuda Kageyu 2016-02-18 14:29:17 +09:00
parent 6a9db50c03
commit 887f3b28e5

View 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;