Post B5SjeX6NI0dw0zzyTY by linear@nya.social
 (DIR) More posts by linear@nya.social
 (DIR) Post #B5SbmcLerrFmyDUWuG by linear@nya.social
       0 likes, 0 repeats
       
       absolutely love to delete hundreds of lines of code from a codebase with zero change in functionality
       
 (DIR) Post #B5SdSq5oFyBRiLm7M0 by linear@nya.social
       1 likes, 0 repeats
       
       just deleted another 1200 linesthat makes over 1% of the codebase deleted in the span of an hour(not including vendored code)
       
 (DIR) Post #B5SjeWsY7PaHK7WvvU by csepp@merveilles.town
       0 likes, 0 repeats
       
       @linear Wish I could do this, but it would require having a test suite to make sure there really was no loss in functionality. :sadlinux:
       
 (DIR) Post #B5SjeX6NI0dw0zzyTY by linear@nya.social
       0 likes, 0 repeats
       
       @csepp@merveilles.town being that this is a quake 2 mod, the stakes are relatively lowalso the changes are things like, taking hundreds of lines of global variable declarations that are duplicated as definitions in the file where they are "implemented", and using a macro to instead just remove the extern when it's declared in the header by defining FILE_NAME_IMPL at the top of the relevant filethis commit for example https://github.com/VortexQuake2/Vortex/commit/acd001c14d7b12b444639b51c0f9d54bf922f1f3
       
 (DIR) Post #B5SrJIA0RgJHE950Eq by compucat@im-in.space
       0 likes, 0 repeats
       
       @linear geez. just dead code or hideously verbose?
       
 (DIR) Post #B5SrJIMPhYEbqcsuZs by linear@nya.social
       0 likes, 0 repeats
       
       @compucat@im-in.space expand the diffs here and see for yourself https://github.com/VortexQuake2/Vortex/commit/acd001c14d7b12b444639b51c0f9d54bf922f1f3removing some very old dead code and comments in followup commits though
       
 (DIR) Post #B5SvVp6ICUAYgGZcY4 by compucat@im-in.space
       0 likes, 0 repeats
       
       @linear aha, clever, I see! well, almost - i don't see where v_luasettings.c is including src/characters/settings.hbut i assume that's happening somewhere for the macro trick to work
       
 (DIR) Post #B5SvVpHHXcxZELiOg4 by linear@nya.social
       0 likes, 0 repeats
       
       @compucat@im-in.space the "g_local" header includes basically everything inside the game code environment, and the api for the engine itself. g_local.h includes v_shared.h, which includes characters/settings.h