Bug 214543 - Use std::clamp for clarity at more call sites
Summary: Use std::clamp for clarity at more call sites
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-19 22:54 PDT by Darin Adler
Modified: 2022-11-12 21:36 PST (History)
40 users (show)

See Also:


Attachments
Patch (102.40 KB, patch)
2020-07-19 23:20 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (102.41 KB, patch)
2020-07-20 10:36 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (102.18 KB, patch)
2020-07-21 13:04 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2020-07-19 22:54:21 PDT
Use std::clamp for clarity at more call sites
Comment 1 Darin Adler 2020-07-19 23:20:15 PDT Comment hidden (obsolete)
Comment 2 Darin Adler 2020-07-20 10:36:45 PDT
Created attachment 404725 [details]
Patch
Comment 3 Darin Adler 2020-07-21 13:04:45 PDT
Created attachment 404854 [details]
Patch
Comment 4 Darin Adler 2020-07-21 15:35:57 PDT
Unfortunately I have learned if high is less than low, then std::clamp(x, low, high) returns high.
Comment 5 Radar WebKit Bug Importer 2020-07-26 22:55:17 PDT
<rdar://problem/66146541>
Comment 6 Darin Adler 2022-11-12 21:36:07 PST
Might do this some day, but not going to keep a bug open.