Projects > cpp > Issues > Bug #3463

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

Create Issue on Github

Potential hash collision by using typeid(T).hash_code() in JSB and LuaBinding

Bug #3463 [Closed]
dumganhar 2013-12-20 09:04 . Updated almost 10 years ago

Instead of using std::unordered_map<long, T>(long is the hash_code generated by typeid(T).hash_code()),
We needs to use std::unordered_map<std::string, T> to avoid collision since unordered_map internally processes collisions.

dumganhar 2013-12-20 12:31
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:fcafd035305759fe5328baef623eb3dd2a2feb5b.

Atom PDF

Start date:2013-12-20
Due date:
% Done:


Category:js, lua
Target version:3.0-beta