diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-21 20:18:49 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-21 20:18:49 +0100 |
commit | 5a2c4a89fa0b1db5f4d0d45087521fda7a89a5f6 (patch) | |
tree | de140720dd68a03145c2d88f33cac57598d130b3 | |
parent | First commit passing IWYU (diff) | |
download | libdbpp-5a2c4a89fa0b1db5f4d0d45087521fda7a89a5f6.tar.bz2 libdbpp-5a2c4a89fa0b1db5f4d0d45087521fda7a89a5f6.tar.xz libdbpp-5a2c4a89fa0b1db5f4d0d45087521fda7a89a5f6.zip |
Tidy up IWYU
-rw-r--r-- | iwyu.json | 50 | ||||
-rw-r--r-- | libdbpp/column.h | 5 | ||||
-rw-r--r-- | libdbpp/command.h | 5 | ||||
-rw-r--r-- | libdbpp/selectcommand.cpp | 4 | ||||
-rw-r--r-- | libdbpp/testCore.cpp | 6 | ||||
-rw-r--r-- | libdbpp/testCore.h | 3 | ||||
m--------- | libdbpp/unittests/libdbpp-mysql | 0 | ||||
m--------- | libdbpp/unittests/libdbpp-odbc | 0 | ||||
m--------- | libdbpp/unittests/libdbpp-postgresql | 0 | ||||
m--------- | libdbpp/unittests/libdbpp-sqlite | 0 | ||||
-rw-r--r-- | libdbpp/unittests/testUtils.cpp | 11 |
11 files changed, 57 insertions, 27 deletions
@@ -19,7 +19,7 @@ "symbol": [ "boost::posix_time::time_duration", "private", - "<boost/date_time/posix_time/posix_time_types.hpp>", + "<boost/date_time/posix_time/posix_time.hpp>", "public" ] }, @@ -32,6 +32,22 @@ ] }, { + "include": [ + "@.field_types.h.", + "private", + "<mysql.h>", + "public" + ] + }, + { + "include": [ + "@.mysql_time.h.", + "private", + "<mysql.h>", + "public" + ] + }, + { "symbol": [ "free", "private", @@ -121,6 +137,38 @@ }, { "include": [ + "@<boost/date_time/gregorian/.*>", + "private", + "<boost/date_time/gregorian_calendar.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/date_time/time_.*>", + "private", + "<boost/date_time/time.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/date_time/posix_time/posix_time_.*>", + "private", + "<boost/date_time/posix_time/posix_time.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/date_time/posix_time/(ptime|conversion|time_(formatt|pars)ers).hpp>", + "private", + "<boost/date_time/posix_time/posix_time.hpp>", + "public" + ] + }, + { + "include": [ "@<boost/preprocessor/.*>", "private", "<boost/test/unit_test.hpp>", diff --git a/libdbpp/column.h b/libdbpp/column.h index 11a4658..2924d77 100644 --- a/libdbpp/column.h +++ b/libdbpp/column.h @@ -11,7 +11,7 @@ #endif #include <glibmm/ustring.h> #pragma GCC diagnostic pop -#include <boost/date_time/posix_time/ptime.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include <cstdint> #include <memory> #include <optional> @@ -21,9 +21,6 @@ #include <typeinfo> #include <visibility.h> -namespace boost::posix_time { - class time_duration; -} namespace DB { class Blob; /// Abstract class for something that can handle field data. See Column::apply. diff --git a/libdbpp/command.h b/libdbpp/command.h index 8c3262b..2c3e9ee 100644 --- a/libdbpp/command.h +++ b/libdbpp/command.h @@ -3,7 +3,7 @@ #include "command_fwd.h" #include "error.h" -#include <boost/date_time/posix_time/ptime.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/lexical_cast.hpp> #include <c++11Helpers.h> #include <cstddef> @@ -22,9 +22,6 @@ #include <type_traits> #include <visibility.h> -namespace boost::posix_time { - class time_duration; -} namespace DB { class Blob; /// Exception thrown when binding a parameter of type the connector doesn't support. diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp index f67fca0..3217f3b 100644 --- a/libdbpp/selectcommand.cpp +++ b/libdbpp/selectcommand.cpp @@ -1,14 +1,14 @@ #include "selectcommand.h" #include "error.h" #include <boost/multi_index/indexed_by.hpp> -#include <boost/multi_index/mem_fun.hpp> // IWYU pragma: keep -#include <boost/multi_index/member.hpp> // IWYU pragma: keep +#include <boost/multi_index/member.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index_container.hpp> #include <boost/operators.hpp> #include <compileTimeFormatter.h> #include <glibmm/ustring.h> #include <utility> +// IWYU pragma: no_forward_declare boost::multi_index::member namespace DB { ColumnIndexOutOfRange::ColumnIndexOutOfRange(unsigned int n) : colNo(n) { } diff --git a/libdbpp/testCore.cpp b/libdbpp/testCore.cpp index bb92cf4..94e1cbf 100644 --- a/libdbpp/testCore.cpp +++ b/libdbpp/testCore.cpp @@ -1,7 +1,6 @@ #include "testCore.h" #include "column.h" -#include <boost/date_time/posix_time/conversion.hpp> -#include <boost/date_time/posix_time/posix_time.hpp> // IWYU pragma: keep +#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/test/unit_test.hpp> #include <compileTimeFormatter.h> #include <fileUtils.h> @@ -9,9 +8,6 @@ #include <type_traits> #include <typeinfo> -namespace boost::posix_time { - class time_duration; -} namespace DB { TestCore::TestCore() : testString("Some C String"), testDateTime(boost::posix_time::from_time_t(1430530593)), diff --git a/libdbpp/testCore.h b/libdbpp/testCore.h index a7a261a..32c033d 100644 --- a/libdbpp/testCore.h +++ b/libdbpp/testCore.h @@ -2,8 +2,7 @@ #define DB_TESTCORE_H #include "dbTypes.h" -#include <boost/date_time/posix_time/posix_time_types.hpp> -#include <boost/date_time/posix_time/ptime.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include <cstdint> #include <iosfwd> #include <string_view> diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql -Subproject a8630518c10667ff88f0e0846de98337743a580 +Subproject b8d27474eb1dbf54977364377c138f5a3fce402 diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc -Subproject b7f71b71224238a8b7bdb76b6feb98db9bac7aa +Subproject a32c4204fa9d99ab3dd6c1b1bcfbeee3a5318bf diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql -Subproject 465ea24362ee267cf83909efa0b5cdee689ff1f +Subproject d629a2404592fbf73f8378d1e010fbab9cfe2db diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite -Subproject f036fb38fb75c1298f6729ffc2f7d411b547885 +Subproject 1aed242983a48d7f06562d4aba5be287be59a0d diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp index 043fc30..e95b572 100644 --- a/libdbpp/unittests/testUtils.cpp +++ b/libdbpp/unittests/testUtils.cpp @@ -7,10 +7,8 @@ #include "mockDatabase.h" #include <IceUtil/Exception.h> // IWYU pragma: keep #include <IceUtil/Optional.h> -#include <boost/date_time/posix_time/conversion.hpp> -#include <boost/date_time/posix_time/posix_time_io.hpp> -#include <boost/date_time/posix_time/posix_time_types.hpp> -#include <boost/date_time/posix_time/ptime.hpp> +#include <boost/date_time/gregorian_calendar.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/static_assert.hpp> #include <connection.h> #include <cstdint> @@ -40,13 +38,8 @@ namespace DB { class InvalidConversion; -} -namespace DB { class UnexpectedNullValue; } -namespace boost::posix_time { - class time_duration; -} class StandardMockDatabase : public DB::PluginMock<PQ::Mock> { public: |