| 1 |
.. title:: clang-tidy - readability-convert-member-functions-to-static |
| 2 |
|
| 3 |
readability-convert-member-functions-to-static |
| 4 |
============================================== |
| 5 |
|
| 6 |
Finds non-static member functions that can be made ``static`` |
| 7 |
because the functions don't use ``this``. |
| 8 |
|
| 9 |
After applying modifications as suggested by the check, running the check again |
| 10 |
might find more opportunities to mark member functions ``static``. |
| 11 |
|
| 12 |
After making a member function ``static``, you might want to run the check |
| 13 |
:doc:`readability-static-accessed-through-instance <../readability/static-accessed-through-instance>` to replace calls like |
| 14 |
``Instance.method()`` by ``Class::method()``. |