From 84a29b2d351c07868ec150efcf15263f373fe9d7 Mon Sep 17 00:00:00 2001 From: Anubisss Date: Thu, 30 Sep 2010 20:32:09 +0200 Subject: Remove const from MySQLConnectionInfo, can't use non const functions in a const struct. This fixes the compile error. --HG-- branch : trunk --- src/server/shared/Database/MySQLConnection.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/server/shared/Database/MySQLConnection.h') diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 34287948aed..6dc22efd130 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -53,11 +53,6 @@ struct MySQLConnectionInfo std::string database; std::string host; std::string port_or_socket; - - void ChangeHost(const std::string& newHost) /// Needed for unix socket case - { - host = newHost; - } }; class MySQLConnection @@ -66,8 +61,8 @@ class MySQLConnection friend class PingOperation; public: - MySQLConnection(const MySQLConnectionInfo& connInfo); //! Constructor for synchroneous connections. - MySQLConnection(ACE_Activation_Queue* queue, const MySQLConnectionInfo& connInfo); //! Constructor for asynchroneous connections. + MySQLConnection(MySQLConnectionInfo& connInfo); //! Constructor for synchroneous connections. + MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo); //! Constructor for asynchroneous connections. ~MySQLConnection(); virtual bool Open(); @@ -111,7 +106,7 @@ class MySQLConnection ACE_Activation_Queue* m_queue; //! Queue shared with other asynchroneous connections. DatabaseWorker* m_worker; //! Core worker task. MYSQL * m_Mysql; //! MySQL Handle. - const MySQLConnectionInfo& m_connectionInfo; //! Connection info (used for logging) + MySQLConnectionInfo& m_connectionInfo; //! Connection info (used for logging) ACE_Thread_Mutex m_Mutex; }; -- cgit v1.2.3