]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_user_info.cpp
Disable cppcheck for foreign libs by default.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_user_info.cpp
index a4a808d2aeb27458aca7a785474db494a5a22938..ccc86d8ce9f694267d49d7955571eb902022ed0d 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "stg/users.h"
 #include "stg/user.h"
 
 #include "stg/users.h"
 #include "stg/user.h"
-#include "stg/common.h"
 
 #include <strings.h> // strcasecmp
 
 
 #include <strings.h> // strcasecmp
 
@@ -44,15 +43,16 @@ int USER_INFO::Start(void * /*data*/, const char *el, const char **attr)
 
 void USER_INFO::CreateAnswer()
 {
 
 void USER_INFO::CreateAnswer()
 {
-    CONST_USER_PTR u;
+    using ConstUserPtr = const User*;
+    ConstUserPtr u;
     if (m_users.FindByName(m_login, &u))
     {
         m_answer = "<UserInfo result=\"error\"/>";
         return;
     }
 
     if (m_users.FindByName(m_login, &u))
     {
         m_answer = "<UserInfo result=\"error\"/>";
         return;
     }
 
-    m_answer = "<UserInfo lastAuthTime=\"" + x2str(u->GetAuthorizedModificationTime()) + "\"" +
-             " lastDisconnectTime=\"" + x2str(u->GetConnectedModificationTime()) + "\"" +
+    m_answer = "<UserInfo lastAuthTime=\"" + std::to_string(u->GetAuthorizedModificationTime()) + "\"" +
+             " lastDisconnectTime=\"" + std::to_string(u->GetConnectedModificationTime()) + "\"" +
              " connected=\"" + (u->GetConnected() ? "true" : "false") + "\"" +
              " lastDisconnectReason=\"" + u->GetLastDisconnectReason() + "\">";
     std::vector<std::string> list(u->GetAuthorizers());
              " connected=\"" + (u->GetConnected() ? "true" : "false") + "\"" +
              " lastDisconnectReason=\"" + u->GetLastDisconnectReason() + "\">";
     std::vector<std::string> list(u->GetAuthorizers());