Open vomikan opened 5 years ago
g++ -Wold-style-cast
:
Warn if an old-style (C-style) cast to a non-void type is used within a C++ program. The new-style casts ("dynamic_cast", "static_cast", "reinterpret_cast", and "const_cast") are less vulnerable to unintended effects and much easier to search for.
Additionally, the C++11 standard specifies the following additional rules:
This can be checked with -Wdeprecated-copy
in latest GCC 9:
Warn that the implicit declaration of a copy constructor or copy assignment operator is deprecated if the class has a user-provided copy constructor or copy assignment operator, in C++11 and up. This warning is enabled by -Wextra. With -Wdeprecated-copy-dtor, also deprecate if the class has a user-provided destructor.
Build log from GCC 9 with above mentioned warnings: https://travis-ci.org/slodki/moneymanagerex/jobs/525613018#L441
Prefixes are sometimes useful: Is - to ask a question about something. Whenever someone sees Is they will know it's a question. Get - get a value. Set - set a value.