From 192f9f0cb5ef3cfecb8c3a99d9f02e0c6188ae07 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 3 Jul 2014 21:49:14 -0700 Subject: [PATCH] Fix for GCC+11 compile --- common/MySQLRequestResult.h | 5 ++++- common/MySQLRequestRow.cpp | 11 ++++++++++- common/MySQLRequestRow.h | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/common/MySQLRequestResult.h b/common/MySQLRequestResult.h index ef2dcd104..05f363722 100644 --- a/common/MySQLRequestResult.h +++ b/common/MySQLRequestResult.h @@ -10,6 +10,8 @@ #include <../common/types.h> #include <../common/MySQLRequestRow.h> #include +#include +#include class MySQLRequestResult { private: @@ -52,4 +54,5 @@ private: }; -#endif \ No newline at end of file +#endif + diff --git a/common/MySQLRequestRow.cpp b/common/MySQLRequestRow.cpp index 5fc4a40e8..d00cbc835 100644 --- a/common/MySQLRequestRow.cpp +++ b/common/MySQLRequestRow.cpp @@ -19,6 +19,15 @@ MySQLRequestRow::MySQLRequestRow(MySQLRequestRow&& moveItem) moveItem.m_MySQLRow = nullptr; } +MySQLRequestRow& MySQLRequestRow::operator=(MySQLRequestRow& moveItem) +{ + m_Result = moveItem.m_Result; + m_MySQLRow = moveItem.m_MySQLRow; + + moveItem.m_Result = nullptr; + moveItem.m_MySQLRow = nullptr; +} + MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result) : m_Result(result), m_MySQLRow(mysql_fetch_row(m_Result)) { @@ -51,4 +60,4 @@ char* MySQLRequestRow::operator[](int index) { return m_MySQLRow[index]; -} \ No newline at end of file +} diff --git a/common/MySQLRequestRow.h b/common/MySQLRequestRow.h index 615a75371..8e979acab 100644 --- a/common/MySQLRequestRow.h +++ b/common/MySQLRequestRow.h @@ -23,6 +23,7 @@ public: MySQLRequestRow(MYSQL_RES *result); MySQLRequestRow(const MySQLRequestRow& row); MySQLRequestRow(MySQLRequestRow&& moveItem); + MySQLRequestRow& operator=(MySQLRequestRow& moveItem); MySQLRequestRow& operator++(); MySQLRequestRow operator++(int); bool operator==(const MySQLRequestRow& rhs); @@ -34,4 +35,4 @@ public: -#endif \ No newline at end of file +#endif