diff options
author | Philip <philip_smc@prbotha.net> | 2023-10-14 09:06:20 +0200 |
---|---|---|
committer | Philip <philip_smc@prbotha.net> | 2023-10-14 09:06:20 +0200 |
commit | 08b966e24f1ea39d6ede91b515082f857ce1476b (patch) | |
tree | 9eae90c22971e02241e46f345c603352c2feb3ad /src | |
parent | b138778fd952b2e9712fca81a52b27349157d541 (diff) | |
download | pugixml-08b966e24f1ea39d6ede91b515082f857ce1476b.zip pugixml-08b966e24f1ea39d6ede91b515082f857ce1476b.tar.gz pugixml-08b966e24f1ea39d6ede91b515082f857ce1476b.tar.bz2 |
Fixed zero as nullptr constant in macro.
Removed white space that was changed.
Diffstat (limited to 'src')
-rw-r--r-- | src/pugixml.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 14fc19f..7f0beee 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -22,7 +22,6 @@ #include <assert.h> #include <limits.h> - #ifdef PUGIXML_WCHAR_MODE # include <wchar.h> #endif @@ -2626,7 +2625,7 @@ PUGI_IMPL_NS_BEGIN #define PUGI_IMPL_SCANWHILE(X) { while (X) ++s; } #define PUGI_IMPL_SCANWHILE_UNROLL(X) { for (;;) { char_t ss = s[0]; if (PUGI_IMPL_UNLIKELY(!(X))) { break; } ss = s[1]; if (PUGI_IMPL_UNLIKELY(!(X))) { s += 1; break; } ss = s[2]; if (PUGI_IMPL_UNLIKELY(!(X))) { s += 2; break; } ss = s[3]; if (PUGI_IMPL_UNLIKELY(!(X))) { s += 3; break; } s += 4; } } #define PUGI_IMPL_ENDSEG() { ch = *s; *s = 0; ++s; } - #define PUGI_IMPL_THROW_ERROR(err, m) return error_offset = m, error_status = err, static_cast<char_t*>(0) + #define PUGI_IMPL_THROW_ERROR(err, m) return error_offset = m, error_status = err, static_cast<char_t*>(PUGIXML_NULL) #define PUGI_IMPL_CHECK_ERROR(err, m) { if (*s == 0) PUGI_IMPL_THROW_ERROR(err, m); } PUGI_IMPL_FN char_t* strconv_comment(char_t* s, char_t endch) @@ -8096,12 +8095,12 @@ PUGI_IMPL_NS_BEGIN } } - const char_t* c_str() const + const char_t* c_str() const { return _buffer; } - size_t length() const + size_t length() const { return _uses_heap ? _length_heap : strlength(_buffer); } @@ -8124,7 +8123,7 @@ PUGI_IMPL_NS_BEGIN return const_cast<char_t*>(_buffer); } - bool empty() const + bool empty() const { return *_buffer == 0; } |