{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1604","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1604/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1604/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1604/events","html_url":"https://github.com/HaxeFlixel/flixel/pull/1604","id":105469857,"number":1604,"title":"FlxPool & FlxTypedButton: optimization that removes dynamic casting in c++","user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-08T21:11:15Z","updated_at":"2015-09-09T13:37:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/pulls/1604","html_url":"https://github.com/HaxeFlixel/flixel/pull/1604","diff_url":"https://github.com/HaxeFlixel/flixel/pull/1604.diff","patch_url":"https://github.com/HaxeFlixel/flixel/pull/1604.patch"},"body":"AFAIK, this has no external changes to the API or the behavior, and from inspecting the generated CPP and hxscout, removes the dynamic cast entirely.\r\n\r\nbefore:\r\n```cpp\r\nDynamic tmp = this->label;\r\n```\r\n\r\nafter:\r\n```cpp\r\n::flixel::FlxSprite tmp = this->_labelAsSprite;\r\n```\r\n\r\nUPDATE: I also added the @:generic meta to FlxPool to properly generate the generic variants the avoid the dynamic casting."},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/138911080","html_url":"https://github.com/HaxeFlixel/flixel/pull/1604#issuecomment-138911080","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1604","id":138911080,"user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T13:37:09Z","updated_at":"2015-09-09T13:37:09Z","body":"@larsiusprime It's not really a FlashDevelop isuse, but one with Haxe compiler completion. Unfortunately I wasn't able to reproduce it consistently and/or isolate it, so reporting it wouldn't really help much - so I decided [to just get rid of the @:generic](https://github.com/HaxeFlixel/flixel/commit/d0c8957226ab9d3e401508a076fb9541703abbd0).\r\n\r\nIt's a bit of a hack, but it probably helps with completion issues - we could wrap the metadata into `#if !display` again like I did before that commit I linked.\r\n\r\n"}}