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>2014-06-25 12:07:44 +0400
committerMilo Yip <miloyip@gmail.com>2014-06-25 12:07:44 +0400
commitf930d9e2e5976d75f63f634981db2102c31c04b3 (patch)
tree7d12df4a6c0ca088da7c78fb8136a2f31b7f7f39 /include/rapidjson/internal/stack.h
parente4ffa48a7563e892047c27f0a50fdeb6f71e6b8b (diff)
Revert "Remove some clang -Weverything warnings."
This reverts commit e4ffa48a7563e892047c27f0a50fdeb6f71e6b8b.
Diffstat (limited to 'include/rapidjson/internal/stack.h')
-rw-r--r--include/rapidjson/internal/stack.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h
index c1a8bedd..6ed47e33 100644
--- a/include/rapidjson/internal/stack.h
+++ b/include/rapidjson/internal/stack.h
@@ -42,7 +42,7 @@ public:
stack_top_ = stack_ + size;
stack_end_ = stack_ + stack_capacity_;
}
- T* ret = reinterpret_cast<T*>(stack_top_);
+ T* ret = (T*)stack_top_;
stack_top_ += sizeof(T) * count;
return ret;
}
@@ -51,13 +51,13 @@ public:
T* Pop(size_t count) {
RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T));
stack_top_ -= count * sizeof(T);
- return reinterpret_cast<T*>(stack_top_);
+ return (T*)stack_top_;
}
template<typename T>
T* Top() {
RAPIDJSON_ASSERT(GetSize() >= sizeof(T));
- return reinterpret_cast<T*>(stack_top_ - sizeof(T));
+ return (T*)(stack_top_ - sizeof(T));
}
template<typename T>
@@ -65,7 +65,7 @@ public:
Allocator& GetAllocator() { return *allocator_; }
bool Empty() const { return stack_top_ == stack_; }
- size_t GetSize() const { return static_cast<size_t>(stack_top_ - stack_); }
+ size_t GetSize() const { return stack_top_ - stack_; }
size_t GetCapacity() const { return stack_capacity_; }
private: