summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_json.h1
-rw-r--r--include/m_system.h9
-rw-r--r--libs/libjson/src/libjson.def1
-rw-r--r--libs/libjson/src/libjson64.def1
-rw-r--r--libs/libjson/src/stdafx.cxx7
-rw-r--r--protocols/Discord/src/stdafx.h11
-rw-r--r--protocols/Discord/src/utils.cpp9
7 files changed, 19 insertions, 20 deletions
diff --git a/include/m_json.h b/include/m_json.h
index 540fed3db0..7ab182d109 100644
--- a/include/m_json.h
+++ b/include/m_json.h
@@ -159,6 +159,7 @@ struct JSON_PARAM : public PARAM
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT64_PARAM &param);
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const SINT64_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const BOOL_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const CHAR_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const WCHAR_PARAM &param);
diff --git a/include/m_system.h b/include/m_system.h
index a772ef6134..39477b4d84 100644
--- a/include/m_system.h
+++ b/include/m_system.h
@@ -531,6 +531,15 @@ struct INT64_PARAM : public PARAM
}
};
+struct SINT64_PARAM : public PARAM
+{
+ int64_t iValue;
+ __forceinline SINT64_PARAM(const char *_name, int64_t _value) :
+ PARAM(_name), iValue(_value)
+ {
+ }
+};
+
struct CHAR_PARAM : public PARAM
{
const char *szValue;
diff --git a/libs/libjson/src/libjson.def b/libs/libjson/src/libjson.def
index 258e53e12e..0323f23db1 100644
--- a/libs/libjson/src/libjson.def
+++ b/libs/libjson/src/libjson.def
@@ -209,3 +209,4 @@ json_write_formatted @191
??8JSONNode@@QBE_N_K@Z @206 NONAME
??9JSONNode@@QBE_N_J@Z @207 NONAME
??9JSONNode@@QBE_N_K@Z @208 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUSINT64_PARAM@@@Z @209 NONAME
diff --git a/libs/libjson/src/libjson64.def b/libs/libjson/src/libjson64.def
index a79e46e4e6..549cfb0904 100644
--- a/libs/libjson/src/libjson64.def
+++ b/libs/libjson/src/libjson64.def
@@ -209,3 +209,4 @@ json_write_formatted @191
??8JSONNode@@QEBA_N_K@Z @206 NONAME
??9JSONNode@@QEBA_N_J@Z @207 NONAME
??9JSONNode@@QEBA_N_K@Z @208 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUSINT64_PARAM@@@Z @209 NONAME
diff --git a/libs/libjson/src/stdafx.cxx b/libs/libjson/src/stdafx.cxx
index d4f920a7c3..a3f9c5951e 100644
--- a/libs/libjson/src/stdafx.cxx
+++ b/libs/libjson/src/stdafx.cxx
@@ -32,6 +32,13 @@ LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT64_PARAM &param)
return json;
}
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const SINT64_PARAM &param)
+{
+ char str[40];
+ _i64toa(param.iValue, str, 10);
+ return json << CHAR_PARAM(param.szName, str);
+}
+
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const BOOL_PARAM &param)
{
json.push_back(JSONNode(param.szName, param.bValue));
diff --git a/protocols/Discord/src/stdafx.h b/protocols/Discord/src/stdafx.h
index 1a2cbc3278..7e04081d2c 100644
--- a/protocols/Discord/src/stdafx.h
+++ b/protocols/Discord/src/stdafx.h
@@ -66,17 +66,6 @@ extern IconItem g_iconList[];
#include "version.h"
#include "proto.h"
-struct SINT64_PARAM : public PARAM
-{
- int64_t iValue;
- __forceinline SINT64_PARAM(const char *_name, int64_t _value) :
- PARAM(_name), iValue(_value)
- {
- }
-};
-
-JSONNode& operator<<(JSONNode &json, const SINT64_PARAM &param);
-
/////////////////////////////////////////////////////////////////////////////////////////
void BuildStatusList(const CDiscordGuild *pGuild, SESSION_INFO *si);
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp
index 0a96809354..d2b8f701d3 100644
--- a/protocols/Discord/src/utils.cpp
+++ b/protocols/Discord/src/utils.cpp
@@ -32,15 +32,6 @@ int StrToStatus(const CMStringW &str)
/////////////////////////////////////////////////////////////////////////////////////////
-JSONNode& operator<<(JSONNode &json, const SINT64_PARAM &param)
-{
- char str[40];
- _i64toa(param.iValue, str, 10);
- return json << CHAR_PARAM(param.szName, str);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
time_t StringToDate(const CMStringW &str)
{
struct tm T = { 0 };