From e4ffa48a7563e892047c27f0a50fdeb6f71e6b8b Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Wed, 25 Jun 2014 16:06:00 +0800 Subject: Remove some clang -Weverything warnings. --- include/rapidjson/internal/stack.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/rapidjson/internal/stack.h') diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h index 6ed47e33..c1a8bedd 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 = (T*)stack_top_; + T* ret = reinterpret_cast(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 (T*)stack_top_; + return reinterpret_cast(stack_top_); } template T* Top() { RAPIDJSON_ASSERT(GetSize() >= sizeof(T)); - return (T*)(stack_top_ - sizeof(T)); + return reinterpret_cast(stack_top_ - sizeof(T)); } template @@ -65,7 +65,7 @@ public: Allocator& GetAllocator() { return *allocator_; } bool Empty() const { return stack_top_ == stack_; } - size_t GetSize() const { return stack_top_ - stack_; } + size_t GetSize() const { return static_cast(stack_top_ - stack_); } size_t GetCapacity() const { return stack_capacity_; } private: -- cgit v1.2.3