From de53931f9ef7dd918c79062ba76252303eacc67d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 30 Mar 2019 11:43:55 +0000 Subject: Tidy fixes for latest clang --- libdbpp/column.h | 2 +- libdbpp/testCore.cpp | 1 + libdbpp/unittests/Jamfile.jam | 2 ++ libdbpp/unittests/libdbpp-mysql | 2 +- libdbpp/unittests/libdbpp-odbc | 2 +- libdbpp/unittests/libdbpp-postgresql | 2 +- libdbpp/unittests/libdbpp-sqlite | 2 +- libdbpp/unittests/testPatch.cpp | 6 +++--- 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libdbpp/column.h b/libdbpp/column.h index 94d597b..1e7441e 100644 --- a/libdbpp/column.h +++ b/libdbpp/column.h @@ -41,7 +41,7 @@ namespace DB { virtual ~Column() = 0; /// Test if the current value is null. - virtual bool isNull() const = 0; + [[nodiscard]] virtual bool isNull() const = 0; /// Apply a field handler (any sub-class of HandleField) virtual void apply(HandleField &) const = 0; diff --git a/libdbpp/testCore.cpp b/libdbpp/testCore.cpp index 785d990..7004fc4 100644 --- a/libdbpp/testCore.cpp +++ b/libdbpp/testCore.cpp @@ -42,6 +42,7 @@ class Assert : public DB::HandleField { } } + private: const T & expected; }; diff --git a/libdbpp/unittests/Jamfile.jam b/libdbpp/unittests/Jamfile.jam index 5115a33..9096003 100644 --- a/libdbpp/unittests/Jamfile.jam +++ b/libdbpp/unittests/Jamfile.jam @@ -13,6 +13,7 @@ lib boost_date_time ; lib boost_system ; lib boost_utf : : boost_unit_test_framework : : tidy:hicpp-vararg + tidy:misc-non-private-member-variables-in-classes ; lib Ice++11 ; @@ -75,6 +76,7 @@ lib dbpp-local-mysql : ..//dbppcore boost_date_time boost_system + tidy:misc-non-private-member-variables-in-classes : : libdbpp-mysql/libmysqlpp ../..//glibmm diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql index 3a21e86..c25edfb 160000 --- a/libdbpp/unittests/libdbpp-mysql +++ b/libdbpp/unittests/libdbpp-mysql @@ -1 +1 @@ -Subproject commit 3a21e866ac46c33733b3a72d0fdfbce2d3cc72d2 +Subproject commit c25edfb75a65b80a0e0c43bbaf59c7cd806f0b5b diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc index 8810334..332e099 160000 --- a/libdbpp/unittests/libdbpp-odbc +++ b/libdbpp/unittests/libdbpp-odbc @@ -1 +1 @@ -Subproject commit 881033464c13398f78be306d8d785616f0947896 +Subproject commit 332e099b19bd04db46cfffdf7d06b8a888169d49 diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql index f988df5..112a648 160000 --- a/libdbpp/unittests/libdbpp-postgresql +++ b/libdbpp/unittests/libdbpp-postgresql @@ -1 +1 @@ -Subproject commit f988df5245cfb59e893bbe262aac8d6260196bac +Subproject commit 112a648fea61335c2e01f00a1aad584d4fb0d0c8 diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite index ef16da2..5995bd6 160000 --- a/libdbpp/unittests/libdbpp-sqlite +++ b/libdbpp/unittests/libdbpp-sqlite @@ -1 +1 @@ -Subproject commit ef16da27477a2a234cab8aed1e072555d6bb410e +Subproject commit 5995bd64852aeaef3b59444b72229d7077575620 diff --git a/libdbpp/unittests/testPatch.cpp b/libdbpp/unittests/testPatch.cpp index a1c77d3..53fb49e 100644 --- a/libdbpp/unittests/testPatch.cpp +++ b/libdbpp/unittests/testPatch.cpp @@ -128,17 +128,17 @@ BOOST_AUTO_TEST_CASE( testOrder ) tp.cols = {"a", "b", "c", "d"}; tp.pk = {"a", "b"}; tp.order = ℴ - tp.beforeDelete = [](DB::SelectCommandPtr i) { + tp.beforeDelete = [](const DB::SelectCommandPtr & i) { i->forEachRow([](auto a, auto b, auto c, auto d) { fprintf(stderr, "<< %ld %ld %s %s\n", a, b, c.c_str(), d.c_str()); }); }; - tp.beforeUpdate = [](DB::SelectCommandPtr i) { + tp.beforeUpdate = [](const DB::SelectCommandPtr & i) { i->forEachRow([](auto a, auto b, auto c1, auto d1, auto c2, auto d2) { fprintf(stderr, "== %ld %ld %s->%s %s->%s\n", a, b, c1.c_str(), c2.c_str(), d1.c_str(), d2.c_str()); }); }; - tp.beforeInsert = [](DB::SelectCommandPtr i) { + tp.beforeInsert = [](const DB::SelectCommandPtr & i) { i->forEachRow([](auto a, auto b, auto c, auto d) { fprintf(stderr, ">> %ld %ld %s %s\n", a, b, c.c_str(), d.c_str()); }); -- cgit v1.2.3