Optimize map operations

This commit is contained in:
tonymanou 2017-01-29 20:27:52 +01:00 committed by topjohnwu
parent b9495cd1bb
commit c44ae5888c

View File

@ -17,10 +17,9 @@ public class CallbackHandler {
}
public static void unRegister(Event event) {
HashSet<EventListener> list = listeners.get(event);
HashSet<EventListener> list = listeners.remove(event);
if (list != null) {
list.clear();
listeners.remove(event);
}
}