[Mac] Use Fast enumeration consistently in WebFontCache.mm
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Oct 2014 17:05:24 +0000 (17:05 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Oct 2014 17:05:24 +0000 (17:05 +0000)
commitbb3622f3888c40fca79cbb8a22ef88a980296265
treea8d8402a33e0385b0fb4d97e89c058733ecd5466
parent19865edf6e9a780f91f739267004cdb885f0d65d
[Mac] Use Fast enumeration consistently in WebFontCache.mm
https://bugs.webkit.org/show_bug.cgi?id=137791

Reviewed by Darin Adler.

Use fast enumeration consistently in WebFontCache.mm as this results in
more efficient, concise and safer code.

No new tests, no behavior change.

* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
Reserve Vector capacity before the loop as we know how many traits we
are going to append. Also use uncheckedAppend() for performance.

(+[WebFontCache internalFontWithFamily:traits:weight:size:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebFontCache.mm