Projects > cpp > Issues > Bug #2793

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

New Label: C++ best practices

Bug #2793 [Closed]
ricardo 2013-09-10 19:15 . Updated about 10 years ago

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 of FontLetterDefinition to avoid copying it.

Also there many missing const and other stuff.

zhangxm 2013-09-11 02:22
  • Assignee set to zhangxm
zhangxm 2013-09-16 12:32
  • 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

Atom PDF

Status:Closed
Start date:2013-09-10
Priority:Normal
Due date:
Assignee:zhangxm
% Done:

100%

Category:-
Target version:3.0-alpha0