summaryrefslogtreecommitdiff
path: root/lib/input
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-22 16:42:06 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-22 16:42:06 +0100
commit2317b4608821b03da0cc288d06b9c0bdb6b60239 (patch)
tree7dd46e3c2c5601e603baa7defa057cd4d41fc4c9 /lib/input
parentMove everything into more sensible places (diff)
downloadmygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.tar.bz2
mygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.tar.xz
mygrate-2317b4608821b03da0cc288d06b9c0bdb6b60239.zip
Pass linter checks
Except IWYU, doesn't like the C++20 CTF.
Diffstat (limited to 'lib/input')
-rw-r--r--lib/input/mysqlConn.cpp4
-rw-r--r--lib/input/replStream.cpp9
-rw-r--r--lib/input/replStream.h6
3 files changed, 15 insertions, 4 deletions
diff --git a/lib/input/mysqlConn.cpp b/lib/input/mysqlConn.cpp
index 38feb35..6c00628 100644
--- a/lib/input/mysqlConn.cpp
+++ b/lib/input/mysqlConn.cpp
@@ -2,7 +2,9 @@
#include <stdexcept>
namespace MyGrate::Input {
- MySQLConn::MySQLConn(const char * const host, const char * const user, const char * const pass, unsigned short port)
+ MySQLConn::MySQLConn(
+ const char * const host, const char * const user, const char * const pass, unsigned short port) :
+ st_mysql {}
{
mysql_init(this);
if (!mysql_real_connect(this, host, user, pass, "", port, nullptr, 0)) {
diff --git a/lib/input/replStream.cpp b/lib/input/replStream.cpp
index 88c3caf..c894941 100644
--- a/lib/input/replStream.cpp
+++ b/lib/input/replStream.cpp
@@ -1,6 +1,11 @@
#include "replStream.h"
-#include "../eventHandlers.h"
-#include "../mariadb_repl.h"
+#include "mariadb_repl.h"
+#include <eventHandlerBase.h>
+#include <eventHandlers.h>
+#include <memory>
+#include <mysql.h>
+#include <stdexcept>
+#include <utility>
namespace MyGrate::Input {
void
diff --git a/lib/input/replStream.h b/lib/input/replStream.h
index 983d9d3..4b1a7b6 100644
--- a/lib/input/replStream.h
+++ b/lib/input/replStream.h
@@ -1,8 +1,12 @@
#ifndef MYGRATE_INPUT_REPLSTREAM_H
#define MYGRATE_INPUT_REPLSTREAM_H
-#include "../eventSourceBase.h"
#include "mysqlConn.h"
+#include <eventSourceBase.h>
+
+namespace MyGrate {
+ class EventHandlerBase;
+}
namespace MyGrate::Input {
class ReplicationStream : public EventSourceBase, MySQLConn {