| Summary: | Provide implementation for WTF::DefaultHash<bool> | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
| Component: | Web Template Framework | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | andersca, benjamin, cmarcelo, commit-queue, koivisto, mmaxfield, sam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 140577, 140858 | ||||||
| Attachments: |
|
||||||
|
Description
Chris Dumez
2015-01-23 16:37:51 PST
Created attachment 245259 [details]
Patch
Attachment 245259 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/HashFunctions.h:176: More than one command on the same line [whitespace/newline] [4]
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 245259 [details]
Patch
Do we really want to take a single bit and run the intHash(uint8_t) function on it? Any of these might be better, and would give the same result:
inline unsigned intHash(bool key)
{
return key ? 0x62BAF5A0 : 0x4636B9C9;
}
inline unsigned intHash(bool key)
{
return 0x4636B9C9 + key * 0x1C843BD7;
}
inline unsigned intHash(bool key)
{
return 0x4636B9C9 + (((key << 30) - key) & 0x1C843BD7);
}
Comment on attachment 245259 [details] Patch Clearing flags on attachment: 245259 Committed r179061: <http://trac.webkit.org/changeset/179061> All reviewed patches have been landed. Closing bug. |