Bug 159788

Summary: Modernize GlyphMetricsMap
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, darin, kling, koivisto, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.