summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-06 10:02:27 +0100
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-06 10:02:27 +0100
commit5cad3652d934ded5a3d5c423ca40f71c7b4661d8 (patch)
treec4724ccd423e23da02d3fa7a856707ea956c0c07 /src
parent50bfdb1856659a89d4db674abe2b69a2c7589a83 (diff)
Fix compact mode compilation
Clang and gcc seem to treat string literals differently...
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index e5fd4b2..025c687 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4035,7 +4035,7 @@ PUGI__NS_BEGIN
{
writer.write('>');
- const char_t* value = first->contents ? first->contents : PUGIXML_TEXT("");
+ const char_t* value = first->contents ? first->contents + 0 : PUGIXML_TEXT("");
if (PUGI__NODETYPE(first) == node_pcdata)
text_output(writer, value, ctx_special_pcdata, flags);
@@ -4078,17 +4078,17 @@ PUGI__NS_BEGIN
switch (PUGI__NODETYPE(node))
{
case node_pcdata:
- text_output(writer, node->contents ? node->contents : PUGIXML_TEXT(""), ctx_special_pcdata, flags);
+ text_output(writer, node->contents ? node->contents + 0 : PUGIXML_TEXT(""), ctx_special_pcdata, flags);
if ((flags & format_raw) == 0) writer.write('\n');
break;
case node_cdata:
- text_output_cdata(writer, node->contents ? node->contents : PUGIXML_TEXT(""));
+ text_output_cdata(writer, node->contents ? node->contents + 0 : PUGIXML_TEXT(""));
if ((flags & format_raw) == 0) writer.write('\n');
break;
case node_comment:
- node_output_comment(writer, node->contents ? node->contents : PUGIXML_TEXT(""));
+ node_output_comment(writer, node->contents ? node->contents + 0 : PUGIXML_TEXT(""));
if ((flags & format_raw) == 0) writer.write('\n');
break;