[PATCH] speedup in KMimeTypeFactory?
kloecker at kde.org
Sun Oct 19 09:48:30 BST 2008
On Sunday 19 October 2008, Matt Rogers wrote:
> The attached patch makes some changes to the matchFileName function
> in kmimetypefactory.cpp which gets called a lot, especially when
> browsing files in the file manager when trying to open a file.
> + int leftBracketIndex = pattern.indexOf(leftBracket);
+ const int leftBracketIndex = pattern.indexOf(leftBracket);
instead. This will not make the code faster, but it will give other
people reading this code the hint that this variable isn't changed
afterwards. In general, we should constify anything that can be
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel