From b909816fa4f74677c205854ae898ee57677ca317 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 26 Apr 2010 23:15:26 +0100 Subject: Slight QList documentation fix. Mentioning that the operation is constant time is fine, however, saying that it is fast because it preallocates 'to allow fast growth' seems a little bit confusing given these methods are related to item removal. --- src/corelib/tools/qlist.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 6f5bb9b..6cc6fc1 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -853,9 +853,7 @@ void **QListData::erase(void **xi) same as takeAt(0). This function assumes the list is not empty. To avoid failure, call isEmpty() before calling this function. - This operation is very fast (\l{constant time}), because QList - preallocates extra space on both sides of its internal buffer to - allow for fast growth at both ends of the list. + This operation takes \l{constant time}. If you don't use the return value, removeFirst() is more efficient. @@ -870,9 +868,7 @@ void **QListData::erase(void **xi) not empty. To avoid failure, call isEmpty() before calling this function. - This operation is very fast (\l{constant time}), because QList - preallocates extra space on both sides of its internal buffer to - allow for fast growth at both ends of the list. + This operation takes \l{constant time}. If you don't use the return value, removeLast() is more efficient. -- cgit v0.12