summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-29 12:33:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-29 12:33:06 +0300
commit95ee503b0f0a4cb434de65f2d9d7375356e39d74 (patch)
treecf5e7f892eb447477eb3afa67d86023e4d9f0cff
parentc3ea082d06f26646de52113328a4c66bbdf8870d (diff)
these operators better be not inlined
-rw-r--r--protocols/Discord/src/proto.h20
-rw-r--r--protocols/Discord/src/utils.cpp20
2 files changed, 23 insertions, 17 deletions
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index 7e346d4a71..ffa99f8268 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -51,23 +51,9 @@ struct WCHAR_PARAM : public PARAM
};
AsyncHttpRequest* operator<<(AsyncHttpRequest*, const WCHAR_PARAM&);
-__forceinline JSONNode& operator<<(JSONNode &json, const INT_PARAM &param)
-{
- json.push_back(JSONNode(param.szName, param.iValue));
- return json;
-}
-
-__forceinline JSONNode& operator<<(JSONNode &json, const CHAR_PARAM &param)
-{
- json.push_back(JSONNode(param.szName, param.szValue));
- return json;
-}
-
-__forceinline JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM &param)
-{
- json.push_back(JSONNode(param.szName, ptrA(mir_utf8encodeW(param.wszValue)).get()));
- return json;
-}
+JSONNode& operator<<(JSONNode &json, const INT_PARAM &param);
+JSONNode& operator<<(JSONNode &json, const CHAR_PARAM &param);
+JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM &param);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp
index a542a4a7c5..52eecea527 100644
--- a/protocols/Discord/src/utils.cpp
+++ b/protocols/Discord/src/utils.cpp
@@ -23,3 +23,23 @@ void CDiscordProto::SetAllContactStatuses(int status)
if (!getByte(hContact, "ChatRoom"))
setWord(hContact, "Status", (WORD)status);
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+JSONNode& operator<<(JSONNode &json, const INT_PARAM &param)
+{
+ json.push_back(JSONNode(param.szName, param.iValue));
+ return json;
+}
+
+JSONNode& operator<<(JSONNode &json, const CHAR_PARAM &param)
+{
+ json.push_back(JSONNode(param.szName, param.szValue));
+ return json;
+}
+
+JSONNode& operator<<(JSONNode &json, const WCHAR_PARAM &param)
+{
+ json.push_back(JSONNode(param.szName, ptrA(mir_utf8encodeW(param.wszValue)).get()));
+ return json;
+}