-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid conditional branching on uninitialized values
C++ initializes members in the order in which they are defined in class. So the order is important if the members are accessed by other initializers or methods called from them. Class BoxLayerWidget: _roundRect is initialized based on _layerType through the st() method. Class Checkbox: Arguments of _text constructor depend on _checkAlignment through the countTextMinWidth and the checkRect methods.
- Loading branch information
1 parent
e5d8e54
commit 258cacf
Showing
2 changed files
with
2 additions
and
2 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