Projects > cpp > Issues > Bug #3464

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

Create Issue on Github

EventCustom shouldn't use std::hash to generate unique ID

Bug #3464 [Closed]
dumganhar 2013-12-20 11:41 . Updated over 11 years ago

It may generate the same hash value.
In this case, std::unordered_map<ListenerID, T>, ListenerID should not be size_t, it should be string.
std::unordered_map internally will deal with hash collisions.

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

zhangxm 2013-12-30 10:06

It is fixed, right?
Please paste the patch link.
Thanks.

dumganhar 2014-01-02 13:13

Yep, it was fixed. I will find out the PR URL.

dumganhar 2014-01-02 13:17
  • Description updated (diff)
  • Status changed from New to Closed

Atom PDF

Status:Closed
Start date:2013-12-20
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

0%

Category:all
Target version:3.0-beta