-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[clang-tidy] several const changes #896
base: master
Are you sure you want to change the base?
Conversation
@@ -90,7 +90,7 @@ class Scanner { | |||
bool InBlockContext() const { return m_flows.empty(); } | |||
std::size_t GetFlowLevel() const { return m_flows.size(); } | |||
|
|||
Token::TYPE GetStartTokenFor(IndentMarker::INDENT_TYPE type) const; | |||
static Token::TYPE GetStartTokenFor(IndentMarker::INDENT_TYPE type); |
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.
This method is only used in the .cpp file; can you just put it in an anonymous namespace there (rather than making it a static member function)?
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.
It uses INDENT_TYPE , which is declared private.
Couldn't figure out how to move the GetStartTokenFor function in the namespace. |
What was the problem when trying to move GetStartTokenFor into the cpp file? |
|
Rebased. |
f92d321
to
f359277
Compare
Found with readability-const-return-type Signed-off-by: Rosen Penev <[email protected]>
Found with readability-make-member-function-const Signed-off-by: Rosen Penev <[email protected]>
Found with readability-convert-member-functions-to-static Signed-off-by: Rosen Penev <[email protected]>
Found with readability-string-compare Signed-off-by: Rosen Penev <[email protected]>
No description provided.