Skip to content

Commit

Permalink
Enable clang-tidy check modernize-use-override (CleverRaven#59039)
Browse files Browse the repository at this point in the history
* Remove unnecessary const

* Enable clang-tidy modernize-use-override

This ensures that functions which override other functions are
explicitly marked as override (or final).
  • Loading branch information
jbytheway authored Jul 8, 2022
1 parent 658bbe4 commit 350a2ea
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ readability-*,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-modernize-use-override,\
-performance-no-automatic-move,\
-performance-trivially-destructible,\
-performance-unnecessary-value-param,\
Expand Down
2 changes: 1 addition & 1 deletion src/avatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class avatar : public Character
avatar( const avatar & ) = delete;
// NOLINTNEXTLINE(performance-noexcept-move-constructor)
avatar( avatar && );
~avatar();
~avatar() override;
avatar &operator=( const avatar & ) = delete;
// NOLINTNEXTLINE(performance-noexcept-move-constructor)
avatar &operator=( avatar && );
Expand Down
2 changes: 1 addition & 1 deletion src/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class uilist // NOLINT(cata-xy)
};
handle_mouse_result_t handle_mouse( const input_context &ctxt,
const std::string &ret_act,
const bool loop );
bool loop );

public:
// Parameters
Expand Down
2 changes: 1 addition & 1 deletion tools/clang-tidy-plugin/TranslatorCommentsCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TranslatorCommentsCheck : public ClangTidyCheck
{
public:
TranslatorCommentsCheck( StringRef Name, ClangTidyContext *Context );
~TranslatorCommentsCheck();
~TranslatorCommentsCheck() override;

void registerPPCallbacks( const SourceManager &, Preprocessor *, Preprocessor * ) override;
void registerMatchers( ast_matchers::MatchFinder *Finder ) override;
Expand Down

0 comments on commit 350a2ea

Please sign in to comment.