diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-09-17 17:39:06 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-09-17 17:39:06 +0200 |
commit | 77224bbf4842f3c7fb53ad7685f45cf768f5ec38 (patch) | |
tree | 18da9d2a85b71038268b80333f3c27a116b6a3a3 /external/rapidjson/memorystream.h | |
parent | Merge pull request #1083 (diff) | |
parent | remove errant target_link_libraries (diff) | |
download | monero-77224bbf4842f3c7fb53ad7685f45cf768f5ec38.tar.xz |
Merge pull request #1084
5850122 remove errant target_link_libraries (Riccardo Spagni)
58abc09 don't build any miniupnpc executables (Riccardo Spagni)
114e368 don't build miniupnpc test executables (Riccardo Spagni)
bb69371 updated miniupnp (Riccardo Spagni)
f62ebc5 update rapidjson (Riccardo Spagni)
Diffstat (limited to '')
-rw-r--r-- | external/rapidjson/memorystream.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/external/rapidjson/memorystream.h b/external/rapidjson/memorystream.h index beed1efb5..1d71d8a4f 100644 --- a/external/rapidjson/memorystream.h +++ b/external/rapidjson/memorystream.h @@ -15,7 +15,7 @@ #ifndef RAPIDJSON_MEMORYSTREAM_H_ #define RAPIDJSON_MEMORYSTREAM_H_ -#include "rapidjson.h" +#include "stream.h" #ifdef __clang__ RAPIDJSON_DIAG_PUSH @@ -42,8 +42,8 @@ struct MemoryStream { MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {} - Ch Peek() const { return (src_ == end_) ? '\0' : *src_; } - Ch Take() { return (src_ == end_) ? '\0' : *src_++; } + Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_; } + Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_++; } size_t Tell() const { return static_cast<size_t>(src_ - begin_); } Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } |