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

Remove instances of the magic number 60. #76306

Closed
wants to merge 1 commit into from

Conversation

CLIDragon
Copy link
Contributor

Summary

None

Purpose of change

Avoid using magic numbers.

Describe the solution

Run a quick find for the number 60 and replace any instances of distances with

Describe alternatives you've considered

Some of these might not semantically be the actual maximum view distance, but right now they are exactly the same.

Testing

Only replaced a number with a compile time constant equal to that number. If it compiles, it will work exactly the same as before.

Additional context

* Add a new constant, REALITY_BUBBLE_RADIUS, that has the same
  value as MAX_VIEW_DISTANCE, but with a clearer semantic
  meaning (similar to ACTIVITY_SEARCH_DISTANCE).
@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` Player Faction Base / Camp All about the player faction base/camp/site astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Sep 9, 2024
@GuardianDll
Copy link
Member

GuardianDll commented Sep 9, 2024

@CLIDragon CLIDragon marked this pull request as draft September 9, 2024 14:56
@CLIDragon
Copy link
Contributor Author

Marking as draft for now, as I suspect that linked PR includes everything I mentioned here.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 9, 2024
@CLIDragon
Copy link
Contributor Author

It definitely does. This is what I get for not checking open PRs before I make something 😿.

@CLIDragon CLIDragon closed this Sep 11, 2024
@CLIDragon CLIDragon deleted the remove-magic-60 branch September 11, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Player Faction Base / Camp All about the player faction base/camp/site Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants