Rosen Penev
e2848118bf
clang-tidy: use C++ casting
...
Found with google-readability-casting
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-28 09:36:49 +01:00
Rosen Penev
8af176b15e
clang-tidy: use nullptr
...
Found with modernize-use-nullptr
NULL in C++ is 0 whereas it is a void pointer in C. Avoids implicit
conversions.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-04-12 06:50:05 +01:00
Rosen Penev
fc9ca6c71a
clang-tidy: do not use else after return
...
Found with readability-else-after-return
Easier to read.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-11 07:49:21 +01:00
Rosen Penev
944dc8662e
clang-tidy: use auto
...
Found with modernize-use-auto
auto is shorter and can sometimes disambiguate pointer constness.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-11 07:44:42 +01:00
Rosen Penev
23bd93bfb4
clang-tidy: use bool literals
...
Found with modernize-use-bool-literals
Avoids implicit conversions.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-04-09 08:21:48 +01:00
Rosen Penev
9f1514b804
clang-tidy: use using
...
Found with modernize-use-using
Also manually removed a bunch of typedefs as they are no longer useful
in C++.
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rt-using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-08 16:18:02 +01:00
Frediano Ziglio
b174e757fa
Enable -Wshadow warning
...
This flag allows to catch variables or arguments hiding other
variables or attributes.
It helps avoiding some possible mistakes.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-06-25 09:18:59 +01:00
Frediano Ziglio
e6e6ded681
Use C++ IS-A relationship for RedChannelClient and RedChannel
...
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:08 +01:00