Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted cleanups for lin_time.cpp #1056

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vincele
Copy link
Contributor

@vincele vincele commented Mar 9, 2025

First easy batch of cleanups, there should be no issues with this fairly non-controversial lot.

Code Changes:

  • Have the PR Validation Tests been run? compiles & run on linux/musl
  • This is a documentation change only

Issues:

  • None ?

Purpose:

  • What is this pull request trying to do? Cleanups & dead code removal
  • What release is this for? Next
  • Is there a project or milestone we should apply this to? Next

vincele added 5 commits March 9, 2025 23:45
Assuming WIN32 & _WIN32 macros are equivalent, this code is
duplicated.

Signed-off-by: Vincent Legoll <[email protected]>
Copy link
Contributor

@royfalk royfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward to me.

Copy link
Member

@BenjamenMeyer BenjamenMeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Some of the changes only effect Win32 platform so let's make sure that is play tested.
  2. let's make sure this doesn't break the game's ability to pause

reset_time_compression(s, a);
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: is this disabling the games ability to Pause? Or is that being handled somewhere else now?

Copy link
Contributor Author

@vincele vincele Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is unused (AFAIK, I git grep'ed it in engine & assets), I think what is used is the toggle_pause() function, a few lines below in lin_time.cpp (used in engine/src/cmd/ai/firekeyboard.cpp).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vincele thanks - I'll try to pull it down and test to validate. That's my main concern here.

@vincele
Copy link
Contributor Author

vincele commented Mar 10, 2025

  1. Some of the changes only effect Win32 platform so let's make sure that is play tested.

The only change that may affect WIN32 is the removal of the duplicated : #define & #include. I'd be strongly surprised if that had a runtime impact, as that would be very misleading from <windows.h>.

That being said, I'll still wait for an ACK from a WIN32 play test before merging.

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.

4 participants