forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1733821 - [9/9] Drive-by cleanup: add nullptr_t overload for Chec…
…kArg r=nika Since `CheckArg`'s `aParam` is declared as `const CharT **`, it's treated as a deduction parameter. Unfortunately, `nullptr` is of type `nullptr_t`, and it doesn't get coerced before template argument deduction takes place. To allow passing `nullptr`, people have been using unwieldy constructs like `static_cast<const wchar_t**>(nullptr)` when `aParam` isn't needed. Centralize this by adding an overload of `CheckArg` that explicitly takes `nullptr_t` and forwards it on to the primary implementation. Strip out all the now-unnecessary `static_cast`s everywhere else. No functional changes. Differential Revision: https://phabricator.services.mozilla.com/D152327
- Loading branch information
1 parent
8ae15d7
commit bc46f84
Showing
4 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters