-
-
Notifications
You must be signed in to change notification settings - Fork 860
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor clang-tidying #8109
base: master
Are you sure you want to change the base?
Minor clang-tidying #8109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Use constant base font height" and "minor clang-tidying" are two unrelated changes. The latter probably don't raise any questions and can be merged via a separate PR.
23638ea
to
1b5dc0e
Compare
Signed-off-by: Alexander Borsuk <me@alex.bio>
1b5dc0e
to
c72363d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I find these changes strange. Yes, in terms of C++ some methods may be const, but not in terms of design logic.
How making const functions like Invalidate, SetXXX, AddXXX should help to understand the code better - IDK. I made a quick look and don't agree here.
This short example shows how we should filter all tidy stuff.
|
|
||
location::EMyPositionMode GetMyPositionMode() const; | ||
|
||
void SetCustomArrow3d(std::optional<Arrow3dCustomDecl> arrow3dCustomDecl); | ||
void SetCustomArrow3d(std::optional<Arrow3dCustomDecl> arrow3dCustomDecl) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does modifying function are marked as const? Isn't it changing some internal state? It looks confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const for methods is good (but few methonds are confursing). constexpr instead of consts is ploughing sands.
All these functions change state. Indirectly, via the pointer, but anyway.
|
No description provided.