summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamroot.jam4
-rw-r--r--slicer/db/sqlInsertSerializer.cpp2
-rw-r--r--slicer/test/conversions.cpp2
-rw-r--r--slicer/test/preprocessor.cpp2
-rw-r--r--slicer/test/streams.cpp2
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
<variant>debug:<cxxflags>"-W -Wall -Werror -Wextra"
<variant>coverage:<cxxflags>"--coverage"
<variant>coverage:<linkflags>"--coverage"
+ <toolset>tidy:<checkxx>boost-*
+ <toolset>tidy:<checkxx>bugprone-*
+ <toolset>tidy:<checkxx>clang-*
+ <toolset>tidy:<checkxx>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<T>(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<std::string>(*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 <definedDirs.h>
#include "helpers.h"
-namespace fs = std::filesystem;
-
typedef std::map<std::string, unsigned int> 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<std::string>(x);
+ auto str = std::to_string(x);
c(str);
}
}