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

typified p-u #79373

Merged
merged 3 commits into from
Jan 29, 2025
Merged

typified p-u #79373

merged 3 commits into from
Jan 29, 2025

Conversation

PatrikLundell
Copy link
Contributor

Summary

None

Purpose of change

Replace usage of untyped coordinates with typed ones. This time files in the range t - u.

Describe the solution

  • Get rid of the now unused pos() operation from the talker class hierarchy.
  • Identify what the coordinates of untyped coordinates are and change them to those coordinates, adjusting usage accordingly.
  • Gotten rid of some redundant casting of coordinates to the type they already belong to.
  • Gotten rid of an unused structure using untyped coordinates rather than trying to guess what usage the author might have intended for it.

Describe alternatives you've considered

Testing

Load save, walk up ramp, jump into car, drive through hay bales, run over zombie corpse with inventory, run over a turkey, smash into stationary vehicle.

Additional context

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Scenarios New Scenarios, balancing, bugs with scenarios astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jan 27, 2025
@GuardianDll
Copy link
Member

GuardianDll commented Jan 28, 2025

Resolve clang-tidy errors please

@PatrikLundell
Copy link
Contributor Author

I can't, at least not without guidance,..

One of the errors is a comment someone made (and I've seen the errors on previous PRs as well), and it seems to be related to translation directives somehow. I have no idea how to deal with that is a sensible manner (I can remove the '~' character that seems to trigger the test or remove the comment completely, but I guess it was placed there for a reason).

The other one is something about uncrafting not meeting some expectations, and, again, I don't know what's supposed to be done (but I haven't looked at the test code).

@GuardianDll
Copy link
Member

i suspect you just need to swap 3848 and 3849; not sure why only your PR shows it as an error tho, don't remember seeing this error anywhere else

src/map.cpp Outdated Show resolved Hide resolved
@GuardianDll
Copy link
Member

well, here is our answer #79394, it seems it should be within the function
anyway we just gonna ignore erroring clang for this PR, since none of errors are actually related to typification

@PatrikLundell
Copy link
Contributor Author

Good. Turns out my guess was correct, which means the easiest is probably to accept this PR is it's current state and scrub #79394, as this PR now includes the #79394 solution.

The complaint was probably caused by #79336, which probably caused the line to get long enough to have astyle break it.

However, this reveals a deficiency in the test and/or translation support: It ought to have the flexibility to allow the comments placed above the operation the string is included in, rather than require a placement directly above the string, for two reasons:

  • Placement within the operation clutters it, making it harder to read.
  • Astyle can disrupt the connection without any active involvement from the programmer.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 28, 2025
@Maleclypse Maleclypse merged commit 2dc5c12 into CleverRaven:master Jan 29, 2025
27 checks passed
@PatrikLundell PatrikLundell deleted the typify branch January 29, 2025 07:23
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` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. json-styled JSON lint passed, label assigned by github actions Monsters Monsters both friendly and unfriendly. Scenarios New Scenarios, balancing, bugs with scenarios Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants