Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2016-12-23 05:00:30 +0300
committerGitHub <noreply@github.com>2016-12-23 05:00:30 +0300
commit03a73910498d784a3a9429202a90d2fb67be910b (patch)
tree284e3cbf7f49f1c4ec4166ba5f7a591266fcc503 /include/rapidjson/internal
parent369e07d1c9c985487761950d1936ec85f2cc66e8 (diff)
parent95224aff7dff65c448dca374b4c7fccc32680e5c (diff)
Merge pull request #757 from patcheng/feature/fix_clang_warning
added assertion to help suppress clang warnings
Diffstat (limited to 'include/rapidjson/internal')
-rw-r--r--include/rapidjson/internal/stack.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h
index 299e651e..5c5398c3 100644
--- a/include/rapidjson/internal/stack.h
+++ b/include/rapidjson/internal/stack.h
@@ -126,6 +126,7 @@ public:
template<typename T>
RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) {
+ RAPIDJSON_ASSERT(stackTop_);
RAPIDJSON_ASSERT(stackTop_ + sizeof(T) * count <= stackEnd_);
T* ret = reinterpret_cast<T*>(stackTop_);
stackTop_ += sizeof(T) * count;