Bug 154680 - HashMap::ensure() should return an AddResult like all the other add-like functions
Summary: HashMap::ensure() should return an AddResult like all the other add-like func...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-25 09:47 PST by Sam Weinig
Modified: 2016-02-25 14:20 PST (History)
4 users (show)

See Also:


Attachments
Patch (7.10 KB, patch)
2016-02-25 10:09 PST, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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().