From 969d3dd3ffb4fcaf302a8bcc4ddd3fad070f2d3f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 May 2015 15:10:40 +0000 Subject: compilation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@13846 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/src/json/JSONNode.h | 4 ++++ src/mir_core/src/json/internalJSONNode.h | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mir_core/src/json/JSONNode.h b/src/mir_core/src/json/JSONNode.h index 93ca2dd2cd..4490535c69 100644 --- a/src/mir_core/src/json/JSONNode.h +++ b/src/mir_core/src/json/JSONNode.h @@ -114,7 +114,9 @@ public: #endif json_string as_string(void) const; +#if defined(M_STRING_H__) CMString as_mstring(void) const; +#endif long as_int(void) const; double as_float(void) const; bool as_bool(void) const; @@ -554,11 +556,13 @@ inline json_string JSONNode::as_string(void) const JSON_CHECK_INTERNAL(); return internal -> as_string(); } +#if defined(M_STRING_H__) inline CMString JSONNode::as_mstring(void) const { JSON_CHECK_INTERNAL(); return internal->as_mstring(); } +#endif inline long JSONNode::as_int(void) const { JSON_CHECK_INTERNAL(); diff --git a/src/mir_core/src/json/internalJSONNode.h b/src/mir_core/src/json/internalJSONNode.h index 6d857d3cd1..80ae8952f9 100644 --- a/src/mir_core/src/json/internalJSONNode.h +++ b/src/mir_core/src/json/internalJSONNode.h @@ -88,7 +88,9 @@ public: json_string getcomment(void) const; #endif json_string as_string(void) const; - CMString as_mstring(void) const; + #if defined(M_STRING_H__) + CMString as_mstring(void) const; + #endif long as_int(void) const; json_number as_float(void) const; bool as_bool(void) const; @@ -289,10 +291,12 @@ inline json_string internalJSONNode::as_string(void) const { return _string; } -inline CMString internalJSONNode::as_mstring(void) const { - Fetch(); - return CMString(ptrT(mir_utf8decodeT(_string.c_str()))); -} +#if defined(M_STRING_H__) + inline CMString internalJSONNode::as_mstring(void) const { + Fetch(); + return CMString(ptrT(mir_utf8decodeT(_string.c_str()))); + } +#endif inline long internalJSONNode::as_int(void) const { Fetch(); -- cgit v1.2.3