[WK2] Refactoring: WebBackForwardList getters should be const
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 08:47:11 +0000 (08:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 08:47:11 +0000 (08:47 +0000)
commit1b18a0588e75c0f3f8b2af885dc488ff18226e66
treee52d27e214f502353ed6bb7d96e1078127b55127
parent575963147ece607d5362edd4c6d2b355f40362c0
[WK2] Refactoring: WebBackForwardList getters should be const
https://bugs.webkit.org/show_bug.cgi?id=94711

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-23
Reviewed by Kenneth Rohde Christiansen.

Before the change were not consistent with each other
(WebBackForwardList::entries() was const but WebBackForwardList::currentIndex() was not).
Besides having not const getters is not a good practice in C++. (Please read
Scott Meyers. Effective C++ (3rd edition). ISBN: 0-321-33487-6.
Item 3: 'Use const whenever possible').

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backListCount):
(WebKit::WebBackForwardList::forwardListCount):
(WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
* UIProcess/WebBackForwardList.h:
(WebKit::WebBackForwardList::currentIndex):
(WebBackForwardList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebBackForwardList.cpp
Source/WebKit2/UIProcess/WebBackForwardList.h