From e4d19669a995310876d4a855496423aebfbe8103 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 19 Feb 2019 21:16:52 +0000 Subject: More clang tidy fixes --- Jamroot.jam | 4 ++++ slicer/db/sqlInsertSerializer.cpp | 2 ++ slicer/test/conversions.cpp | 2 +- slicer/test/preprocessor.cpp | 2 -- slicer/test/streams.cpp | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index 19e8df2..3a0762e 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -17,6 +17,10 @@ project debug:"-W -Wall -Werror -Wextra" coverage:"--coverage" coverage:"--coverage" + tidy:boost-* + tidy:bugprone-* + tidy:clang-* + tidy:misc-* ; build-project slicer ; diff --git a/slicer/db/sqlInsertSerializer.cpp b/slicer/db/sqlInsertSerializer.cpp index 223f739..9de15eb 100644 --- a/slicer/db/sqlInsertSerializer.cpp +++ b/slicer/db/sqlInsertSerializer.cpp @@ -65,9 +65,11 @@ namespace Slicer { } #define NonNumType(T) \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ void set(T &) const override { throw UnsuitableIdFieldType(#T); } #define NumType(T) \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ void set(T & v) const override { v = boost::numeric_cast(connection->insertId()); } NonNumType(bool); diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp index 3c23814..7cf4b22 100644 --- a/slicer/test/conversions.cpp +++ b/slicer/test/conversions.cpp @@ -106,7 +106,7 @@ namespace Slicer { if (!i) { return std::string(); } - return boost::lexical_cast(*i); + return std::to_string(*i); } } diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp index 228ffe3..e8202ba 100644 --- a/slicer/test/preprocessor.cpp +++ b/slicer/test/preprocessor.cpp @@ -8,8 +8,6 @@ #include #include "helpers.h" -namespace fs = std::filesystem; - typedef std::map ComponentsCount; ComponentsCount COMPONENTS_IN_TEST_ICE = { { "classtype.ice", 1 }, diff --git a/slicer/test/streams.cpp b/slicer/test/streams.cpp index 2f8a513..e22506e 100644 --- a/slicer/test/streams.cpp +++ b/slicer/test/streams.cpp @@ -13,7 +13,7 @@ void TestStream::Produce(const Consumer & c) { for (int x = 0; x < 10; x += 1) { - auto str = boost::lexical_cast(x); + auto str = std::to_string(x); c(str); } } -- cgit v1.2.3