Skip to content

Misc refactors to appease the compiler#1078

Draft
anf3is wants to merge 30 commits into
ReactiveDrop:reactivedrop_betafrom
anf3is:rf/fix-compiler-warnings
Draft

Misc refactors to appease the compiler#1078
anf3is wants to merge 30 commits into
ReactiveDrop:reactivedrop_betafrom
anf3is:rf/fix-compiler-warnings

Conversation

@anf3is
Copy link
Copy Markdown
Contributor

@anf3is anf3is commented Jun 7, 2026

Most of these changes are simple renames to prevent name collisions between:

  1. Function parameters and local declarations
  2. Local declarations and loop variables
  3. Variables in nested and outer loops

Nearly all renames were performed using LSP rename.


All trivial changes have been squashed.

I'm not fully sure about changes in the remaining unsquashed commits. If anyone sees a cleaner solution or finds any error there, I'd appreciate suggestions before I squash them and mark the PR as ready for review.

I'm also not so sure about wider refactor(client): rename ... commits, but this PR compiles and the game runs just fine.

anf3is added 30 commits June 7, 2026 10:14
move type into for

rename filter.GetRecipientCount

rename RGB -> RGBnext

rename for loop i -> j

rename KeyValues

fix i visiblity

remove unused attackerTeam

rename index -> iIndex

rename pPRecipient

rename mass -> massHeld

remove unused result of V_snprintf

inline fPhysObjectMass

rename pPlayer -> pPClient

inline count

fix sit visibility (while -> for)

inline dir

rename te -> tempEntity

rename pTartget -> pTarget2

rename a -> ia

rename inc -> incAdj

rename color -> blockedColor

move x declaration inside scopes where it is used

rename hFunc -> hScopedFunc
maybe missed some outcommented
maybe missed some outcommented
maybe missed some outcommented
maybe missed some outcommented
inline getstat

move dir and angles inside

rename overshadowed i -> j

move int i inside for

rename te -> tempEntity

inline effects

rename observerTarget

inline bVisible

specify ParticleEffect and ControlPoint variables

rename idx

rename iBuffAttachment

rename outer i

remove unused var tPos

rename p -> p2

move int declare into for

rename info -> infoNew

fix i -> t

fix i -> j

rename i -> idx

rename pMaterialWf

rename msg -> kvMsg

move white and blue

remove duplicate fDelay

rename buf ->pathBuf

remove duplicate nNumHistogramBuckets

rename textTall -> smallTextTall

rename kv -> kvActive

add scope for player helper

rename matrix -> matrix2

rename i -> tail

renames in bWireframe

rename msg -> kvMsg

rename pButton -> phButton

rename pProfile -> pProfilePref

rename uvScale -> uvScale2

inline GetModelType

rename pEntry -> pEntry2

rename nNumShadows -> nNumBlobbyShadows

rename angle -> angle_yaw/angle_pitch

rename input -> x_input

rename w/h -> text_w/text_h

rename iRenderCache -> tail

remove unused GetBounds

add ifndef INFESTED_DLL for hudCloseCaption definition

remove duplicated definition of fBracketTime
@anf3is anf3is force-pushed the rf/fix-compiler-warnings branch from bb4a36a to a3fae8f Compare June 7, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant