Bug 154680

Summary: HashMap::ensure() should return an AddResult like all the other add-like functions
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Description Sam Weinig 2016-02-25 09:47:57 PST
HashMap::ensure() should return an AddResult like all the other add-like functitions
Comment 1 Sam Weinig 2016-02-25 10:09:57 PST
Created attachment 272211 [details]
Patch
Comment 2 WebKit Commit Bot 2016-02-25 10:11:35 PST
Attachment 272211 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:515:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:519:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:530:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:534:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:545:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:550:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 6 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2016-02-25 11:28:35 PST
Committed r197123: <http://trac.webkit.org/changeset/197123>
Comment 4 Darin Adler 2016-02-25 14:20:55 PST
Comment on attachment 272211 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:547
> +        EXPECT_EQ(1u, *addResult.iterator->value.get());

No need for get().

> Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:552
> +        EXPECT_EQ(1u, *addResult2.iterator->value.get());

No need for get().