From 37ca641d82f9f80dc3ae6dbd6557a479866537fa Mon Sep 17 00:00:00 2001 From: Masamitsu MURASE Date: Sun, 30 Nov 2014 03:49:23 +0900 Subject: [PATCH] Use static_cast instead of reinterpret_cast for hierarchy navigation. --- json11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json11.cpp b/json11.cpp index 6424554..9803846 100644 --- a/json11.cpp +++ b/json11.cpp @@ -146,10 +146,10 @@ protected: // Comparisons bool equals(const JsonValue * other) const override { - return m_value == reinterpret_cast *>(other)->m_value; + return m_value == static_cast *>(other)->m_value; } bool less(const JsonValue * other) const override { - return m_value < reinterpret_cast *>(other)->m_value; + return m_value < static_cast *>(other)->m_value; } const T m_value;