This repository was archived by the owner on Oct 5, 2023. It is now read-only.
Use static_cast<T*>(NULL) instead of reinterpret_cast<T*>(NULL)#111
Open
jfkthame wants to merge 2 commits intogooglefonts:mainfrom
Open
Use static_cast<T*>(NULL) instead of reinterpret_cast<T*>(NULL)#111jfkthame wants to merge 2 commits intogooglefonts:mainfrom
jfkthame wants to merge 2 commits intogooglefonts:mainfrom
Conversation
Update from googlefonts/sfntly
…x build failures on *BSD. Fixes googlefonts#67.
leizleiz
reviewed
Jan 30, 2020
|
|
||
| CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id) | ||
| : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL), | ||
| : CMap::Builder(static_cast<ReadableFontData*>(NULL), |
Contributor
There was a problem hiding this comment.
Consider switching to nullptr while you are at it?
leizleiz
reviewed
Jan 30, 2020
| ASSERT_FALSE(font_array.empty()); | ||
| Ptr<Font> font = font_array.at(0); | ||
| ASSERT_NE(font, reinterpret_cast<Font*>(NULL)); | ||
| ASSERT_NE(font, static_cast<Font*>(NULL)); |
Contributor
There was a problem hiding this comment.
I believe all the ASSERT/EXPECT EQ/NE checks can just take a nullptr, with no casting.
Contributor
|
Sorry this fell through the cracks. I left a couple comments, but otherwise this mostly looks good. Please note Chromium is no longer using sfntly, and switched to HarfBuzz. So there's little interest in maintaining sfntly. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes build failures reported on BSD systems, see https://bugzilla.mozilla.org/show_bug.cgi?id=1583192 and #67.