Arran Posted December 29, 2016 Share Posted December 29, 2016 Turns out that MTA has a lot of redundant if statements like: if ( pPed ) { // Blah } else m_pScriptDebugging->LogBadPointer ( luaVM, "ped", 1 ); These checks have been unnecessary since the introduction of argStream and I'm guessing they're only still in the code because it's so time consuming to remove them all. I volunteer to go through all the files and delete any of these unnecessary checks but before I do that I want a developer with access to confirm that if I do this, they will merge my pull request(s). I have done 1 file reducing the file by 286 lines: https://github.com/ArranTuna/mtasa-blue/commit/ef83cee0b6024e73230d77b6225debc81e3d6492 I'm guessing removing them will have virtually no performance impact but removing so many redundant lines definitely improves code readability and I am happy to spend many hours finding and removing all of these statements I just need a confirmation from a developer. 1 Link to comment
Jusonex Posted December 29, 2016 Share Posted December 29, 2016 3 hours ago, Arran said: but before I do that I want a developer with access to confirm that if I do this, they will merge my pull request(s). Confirmed Link to comment
Arran Posted December 29, 2016 Author Share Posted December 29, 2016 5 hours ago, Jusonex said: Confirmed Thanks. If there's any other tasks like this, let me know. Link to comment
Recommended Posts