Bug 159788 - Modernize GlyphMetricsMap
Summary: Modernize GlyphMetricsMap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-14 14:59 PDT by Chris Dumez
Modified: 2016-07-14 19:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.85 KB, patch)
2016-07-14 15:03 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-14 14:59:27 PDT
Modernize GlyphMetricsMap a bit.
Comment 1 Chris Dumez 2016-07-14 15:03:58 PDT
Created attachment 283689 [details]
Patch
Comment 2 Darin Adler 2016-07-14 18:47:29 PDT
Comment on attachment 283689 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283689&action=review

> Source/WebCore/platform/graphics/GlyphMetricsMap.h:126
> +
> +    auto& page = m_pages->ensure(pageNumber, [] {
> +        return std::make_unique<GlyphMetricsPage>(unknownMetrics());
> +    }).iterator->value;
> +    return *page;

No need for the local variable:

    return *m_pages->ensure(pageNumber, [] {
        return std::make_unique<GlyphMetricsPage>(unknownMetrics());
    }).iterator->value;
Comment 3 WebKit Commit Bot 2016-07-14 19:08:34 PDT
Comment on attachment 283689 [details]
Patch

Clearing flags on attachment: 283689

Committed r203262: <http://trac.webkit.org/changeset/203262>
Comment 4 WebKit Commit Bot 2016-07-14 19:08:39 PDT
All reviewed patches have been landed.  Closing bug.