--- /dev/null
+Checks: "-*,
+ clang-analyzer-*,
+ misc-*,
+ modernize-*,
+ performance-*,
+ portability-*,
+ readability-*,
+ bugprone-*,
+ -misc-include-cleaner,
+ -modernize-avoid-bind,
+ -modernize-use-trailing-return-type,
+ -bugprone-easily-swappable-parameters,
+ -readability-braces-around-statements,
+ -readability-magic-numbers,
+ -readability-identifier-length,
+ -readability-suspicious-call-argument"
message( STATUS "clang-tidy not found." )
else ()
message( STATUS "clang-tidy found: ${CLANG_TIDY_EXE}" )
- set( DO_CLANG_TIDY "${CLANG_TIDY_EXE}"
- "-checks=-*,\
-clang-analyzer-*,\
-misc-*,\
-modernize-*,\
-performance-*,\
-portability-*,\
-readability-*,\
-bugprone-*,\
--modernize-avoid-bind,\
--modernize-use-trailing-return-type,\
--readability-braces-around-statements, \
--readability-magic-numbers, \
--readability-identifier-length, \
--bugprone-easily-swappable-parameters" )
+ set( DO_CLANG_TIDY "${CLANG_TIDY_EXE}" )
endif ()
endif ()
enable_language (CXX)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wextra -Wshadow -Wno-long-long -Wold-style-cast -Wstrict-aliasing -pedantic")
+set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
if ( CMAKE_COMPILER_IS_GNUCC )
# GCC-specific
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(users.Count(), res); return res; }
+ { return std::to_string(users.Count()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(tariffs.Count(), res); return res; }
+ { return std::to_string(tariffs.Count()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(admins.Count(), res); return res; }
+ { return std::to_string(admins.count()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(services.Count(), res); return res; }
+ { return std::to_string(services.Count()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(corporations.Count(), res); return res; }
+ { return std::to_string(corporations.Count()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(traffcounter.rulesCount(), res); return res; }
+ { return std::to_string(traffcounter.rulesCount()); }
#endif
private:
#ifdef DEBUG
std::string ToString() const override
- { std::string res; std::to_string(value, res); return res; }
+ { return std::to_string(value); }
#endif
private: