-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Point in ui and output #33225
Merged
ZhilkinSerg
merged 7 commits into
CleverRaven:master
from
jbytheway:point_in_ui_and_output
Aug 14, 2019
Merged
Point in ui and output #33225
ZhilkinSerg
merged 7 commits into
CleverRaven:master
from
jbytheway:point_in_ui_and_output
Aug 14, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For most of the text formatting code, it doesn't make sense to use point_north, etc. So revert those changes and add NOLINT markup.
Did these manually because the automatic refactoring can't cope with non-adjacent x, y arguments.
Having ported the callers, now implement the new versions and delete the old function declarations.
Some further calls needed to change that weren't caught by automatic refactoring because they aren't part of the tiles build.
Last tweak coming out of the previous manual changes.
jbytheway
force-pushed
the
point_in_ui_and_output
branch
from
August 14, 2019 15:24
5a00e8f
to
a85fdae
Compare
ZhilkinSerg
added
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Code: Build
Issues regarding different builds and build environments
labels
Aug 14, 2019
Jenkins rebuild. |
misterprimus
pushed a commit
to misterprimus/Cataclysm-DDA
that referenced
this pull request
Sep 21, 2019
* Add overloads for output.h and ui.h functions * Refactoring pass * Manually revert some named point changes For most of the text formatting code, it doesn't make sense to use point_north, etc. So revert those changes and add NOLINT markup. * Port calls to uilist Did these manually because the automatic refactoring can't cope with non-adjacent x, y arguments. * Implement point versions of ui, output functions Having ported the callers, now implement the new versions and delete the old function declarations. * Port curses calls to changed UIs Some further calls needed to change that weren't caught by automatic refactoring because they aren't part of the tiles build. * Final refactoring pass Last tweak coming out of the previous manual changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Build
Issues regarding different builds and build environments
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Output functions and uilist now take point arguments"
Purpose of change
My ongoing effort to increase use of
point
for type safety and code clarity.Describe the solution
Port the functions from
uilist.h
andoutput.h
that previously took separatex
,y
arguments to takepoint
arguments instead.Update other code accordingly.
Describe alternatives you've considered
Quite a lot of these calls required me to add
NOLINTNEXTLINE(cata-use-named-point-constants)
markup to preventpoint
temporaries being rewritten aspoint_south
, etc. This is a little unfortunate.It might be worth somehow whitelisting these functions so that the
cata-use-named-point-constants
check doesn't changepoint
arguments to them, but I haven't done that (and don't plan to). I think these should be the bulk of such markup; I think I've now covered most of the UI functions in my API porting, and for other functions thepoint_north
etc. names will be better choices.Additional context
Inspired by #32017.
Be sure to let the CI run, because this might be breaking Windows or Android builds.
These are lots of UI changes. I have not attempted to test all the UIs which are affected, so I might have broken some, but the changes were largely automated, so hopefully it should be safe.