Commit Graph

31 Commits

Author SHA1 Message Date
James Chen f97b40187c closed #2789: Adds a macro ‘’USE_STD_UNORDERED_MAP” for switching the implementation of Map<K, V> between using std::unordered_map and std::map. 2014-01-20 12:01:40 +08:00
James Chen 0d4d4c53f4 issue #2789: Improves performance for Map<K,V>::keys. 2014-01-20 11:13:29 +08:00
walzer d4c1aa92d5 add copyrights for 2014, in folders other then 2d. 2014-01-07 11:47:11 +08:00
James Chen ebf6d07720 issue #3577: iterator —> const_iterator since Map::getRandomObject is a const function. 2014-01-04 11:41:05 +08:00
andyque 88efbfc9cc remove srand function call 2014-01-03 11:56:58 +08:00
andyque 774542a341 fix compile error of getRandomObject in map
and add srand to  vector and map
2014-01-03 11:53:16 +08:00
andyque 0e90ef8337 fix move assignment operator doesn't clear previous content bug 2014-01-03 10:39:53 +08:00
andyque 8a7228049a fixed self assignment error and provide move semantics to pushBack of Vector<T> 2014-01-02 18:31:43 +08:00
James Chen 3ee48fc1ca Map::bucketSize fix. 2013-12-27 15:50:48 +08:00
James Chen 0d4a816e3b Removes Map<K, V>::capacity(), adds Map<K, V>::bucketCount/bucketSize/bucket methods. 2013-12-27 15:44:23 +08:00
James Chen a8d93ddf72 Restricts the element type for Vector<T> and Map<K, V>, it has to be `Object*` or `ObjectSubClass*`. 2013-12-26 21:49:40 +08:00
Ricardo Quesada 59fee6b8d2 replaces std::for_each with for()
replaces `std::for_each` with C++11 `for( : )`
2013-12-19 13:34:41 -08:00
minggo 21e2b341f1 fix compiling error after fixing conflicts 2013-12-12 14:59:33 +08:00
minggo ab23b47043 use ssize_t for capacity and index in containers 2013-12-12 14:48:26 +08:00
James Chen 3649c12d37 issue #2790: Compilation error fix in CCMap.h. 2013-12-12 14:36:59 +08:00
James Chen 3fc9c93102 issue #2790: Comment fix for Map<K, V>::clear.
Signed-off-by: James Chen <jianhua.chen@cocos2d-x.org>
2013-12-12 12:58:01 +08:00
James Chen 6264336809 issue #2790: Updates comments for Map<K, V> container.
Signed-off-by: James Chen <jianhua.chen@cocos2d-x.org>
2013-12-12 11:54:03 +08:00
James Chen b66fccb5ab issue #2790: Removes Map::erase(first, last). 2013-12-11 18:08:06 +08:00
James Chen be9bb6998b issue #2790: Deprecates Dictionary, Array, String, Integer, Bool, Float, Double classes.
Also renames Map::remove to Map::erase.
2013-12-11 18:08:06 +08:00
boyu0 083a0eea2a Remove all std::move in function returns. 2013-12-10 16:06:05 +08:00
James Chen f16068e621 issue #2790: Bug fix in CCMap.h 2013-12-09 17:55:56 +08:00
James Chen abbcd45c58 issue #2790: CCLOG —> CCLOGINFO in CCMap.h 2013-12-07 23:32:29 +08:00
James Chen beb6bb6c8d issue #2790: Bug fix in CCMap.h 2013-12-07 16:14:22 +08:00
minggo b67d567a79 replace long with int or ssize_t 2013-12-05 17:22:22 +08:00
James 373c3b01bf issue #2790: Fixing compilation errors on linux. 2013-12-05 11:44:37 +08:00
James Chen 944160210c issue #2790: Renames functions in Map<K, V>. 2013-12-05 10:59:43 +08:00
James Chen 499a0404d4 issue #2790: Renames some functions in Vector<T>. Makes it more like stl vector. 2013-12-05 10:35:10 +08:00
James Chen 293ba0210b issue #2790: CCLOG —> CCLOGINFO for CCMap.h and CCVector.h 2013-12-04 16:37:08 +08:00
James Chen 35b96602d3 issue #2790: includes <algorithm> for std::for_each. 2013-12-04 16:02:53 +08:00
James Chen 5eb9446b80 issue #2790: Uses const reference instead of value for std::for_each ’s argument. 2013-12-04 16:02:53 +08:00
James Chen d2bddee11e issue #2790: Adds CCMap.h. 2013-12-04 16:01:56 +08:00