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

Add readability-convert-member-functions-to-static check #650

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#
# SPDX-License-Identifier: MIT
---
Checks: '-*,bugprone-branch-clone,bugprone-reserved-identifier,hicpp-avoid-c-arrays,misc-const-correctness,modernize-use-nullptr,readability-avoid-const-params-in-decls,readability-braces-around-statements,readability-else-after-return,readability-inconsistent-declaration-parameter-name,readability-isolate-declaration,readability-static-definition-in-anonymous-namespace,readability-uppercase-literal-suffix'
Checks: '-*,bugprone-branch-clone,bugprone-reserved-identifier,hicpp-avoid-c-arrays,misc-const-correctness,modernize-use-nullptr,readability-avoid-const-params-in-decls,readability-braces-around-statements,readability-convert-member-functions-to-static,readability-else-after-return,readability-inconsistent-declaration-parameter-name,readability-isolate-declaration,readability-static-definition-in-anonymous-namespace,readability-uppercase-literal-suffix'
WarningsAsErrors: '*'
10 changes: 5 additions & 5 deletions include/ddc/discrete_domain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,22 +302,22 @@ class DiscreteDomain<>
}
#endif

KOKKOS_FUNCTION constexpr std::size_t size() const
static KOKKOS_FUNCTION constexpr std::size_t size()
{
return 1;
}

KOKKOS_FUNCTION constexpr mlength_type extents() const noexcept
static KOKKOS_FUNCTION constexpr mlength_type extents() noexcept
{
return {};
}

KOKKOS_FUNCTION constexpr discrete_element_type front() const noexcept
static KOKKOS_FUNCTION constexpr discrete_element_type front() noexcept
{
return {};
}

KOKKOS_FUNCTION constexpr discrete_element_type back() const noexcept
static KOKKOS_FUNCTION constexpr discrete_element_type back() noexcept
{
return {};
}
Expand Down Expand Up @@ -355,7 +355,7 @@ class DiscreteDomain<>
return *this;
}

KOKKOS_FUNCTION constexpr bool empty() const noexcept
static KOKKOS_FUNCTION constexpr bool empty() noexcept
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion include/ddc/scope_guard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace ddc {

class ScopeGuard
{
void discretization_store_initialization() const
static void discretization_store_initialization()
{
detail::g_discretization_store
= std::make_optional<std::map<std::string, std::function<void()>>>();
Expand Down
Loading