-
-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STYLE: Avoid
T var = elementValue
syntax to initialize a filled array
The C++ copy-initialization syntax `T var = value` suggests that the value at the right side is implicitly converted to the target type `T`. When the target type `T` is a `FixedArray<TValue, VLength>`, or one of its derived types, `T var = elementValue` _fills_ the variable with the specified `elementValue`, by assigning the `elementValue` to each of its elements. In this case, the C++ direct-initialization syntax `T var(elementValue)` appears more appropriate. Occurrences of `T var = elementValue` were found by locally temporarily declaring the corresponding constructors `explicit`.
- Loading branch information
1 parent
5b71d63
commit 0c6c3a9
Showing
5 changed files
with
7 additions
and
7 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
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