Projects > cpp > Issues > Bug #5099

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

Create Issue on Github

Optimization for Value

Bug #5099 [Closed]
dumganhar 2014-05-12 01:50 . Updated about 5 years ago

All internal type should be in one union:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Value
{
...

union
    {
        unsigned char byteVal;
        int intVal;
        float floatVal;
        double doubleVal;
        bool boolVal;

        std::string* strVal;
        ValueVector* vectorVal;
        ValueMap* mapVal;
        ValueMapIntKey* intKeyMapVal;
    }_field;
};

Fixed at https://github.com/cocos2d/cocos2d-x/pull/6535

zhangxm 2014-05-12 15:54
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:94f50b185620fe4d162b95cbc72aa53813936826.

Atom PDF

Status:Closed
Start date:2014-05-12
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

100%

Category:all
Target version:v3.1