We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
New Label: C++ best practices
New Label: C++ best practices
Bug #2793 [Closed]
- Status changed from New to Closed
- % Done changed from 0 to 100
Resolved in this pull request https://github.com/cocos2d/cocos2d-x/pull/3588
Status: | Closed | |
---|---|---|
Start date: | 2013-09-10 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 100% |
|
Category: | - | |
Target version: | 3.0-alpha0 |
The new Label code, has a good design, but the code is not following the cocos2d C++ guidelines.
The whole code needs to be reviewed and fixed if necessary.
Yesterday, while I was looking at it I found that it uses in
CCFontDefinition
:std::map<unsigned short, FontLetterDefinition> _fontLettersDefinitionUTF16;
I guess it should use
FontLetterDefinition*
instead ofFontLetterDefinition
to avoid copying it.Also there many missing
const
and other stuff.