From 97f33dc77945d8f284d14e0eaa994ae1405a3f20 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 11 Nov 2017 20:27:30 +0100 Subject: Core/Misc: Fix static analysis issues --- src/server/scripts/World/action_ip_logger.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 9dc3fba9896..9e894a52104 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -144,7 +144,7 @@ class AccountActionIpLogger : public AccountScript stmt->setUInt32(1, characterGuid); stmt->setUInt8(2, aType); stmt->setUInt32(3, playerGuid); - stmt->setString(4, systemNote.c_str()); + stmt->setString(4, systemNote); LoginDatabase.Execute(stmt); } else // ... but for failed login, we query last_attempt_ip from account table. Which we do with an unique query @@ -155,7 +155,7 @@ class AccountActionIpLogger : public AccountScript stmt->setUInt32(1, characterGuid); stmt->setUInt8(2, aType); stmt->setUInt32(3, playerGuid); - stmt->setString(4, systemNote.c_str()); + stmt->setString(4, systemNote); LoginDatabase.Execute(stmt); } return; @@ -236,8 +236,8 @@ class CharacterActionIpLogger : public PlayerScript stmt->setUInt32(0, playerGuid); stmt->setUInt32(1, characterGuid); stmt->setUInt8(2, aType); - stmt->setString(3, currentIp.c_str()); // We query the ip here. - stmt->setString(4, systemNote.c_str()); + stmt->setString(3, currentIp); // We query the ip here. + stmt->setString(4, systemNote); // Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now; // Rather, we let it be added with the SQL query. @@ -297,7 +297,7 @@ public: stmt2->setUInt32(1, characterGuid); stmt2->setUInt8(2, aType); stmt2->setUInt32(3, playerGuid); - stmt2->setString(4, systemNote.c_str()); + stmt2->setString(4, systemNote); // Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now; // Rather, we let it be added with the SQL query. -- cgit v1.2.3