From 88d395353efc28a085409503d20d9b0e12062cbd Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 7 Jun 2018 15:38:25 +0800 Subject: [PATCH] fix GCC/Clang compiler errors --- source/paint/detail/native_paint_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/paint/detail/native_paint_interface.cpp b/source/paint/detail/native_paint_interface.cpp index 7703747c..f14c7a64 100644 --- a/source/paint/detail/native_paint_interface.cpp +++ b/source/paint/detail/native_paint_interface.cpp @@ -1,7 +1,7 @@ /* * Platform Implementation * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -144,7 +144,7 @@ namespace detail if (::GetTextExtentPoint32(dw->context, text, static_cast(len), &size)) return nana::size(size.cx, size.cy); #elif defined(NANA_X11) - std::string utf8str = to_utf8(std::wstring(text, len)); + std::string utf8text = to_utf8(std::wstring(text, len)); #if defined(NANA_USE_XFT) XGlyphInfo ext; XftFont * fs = reinterpret_cast(dw->font->native_handle()); @@ -154,7 +154,7 @@ namespace detail #else XRectangle ink; XRectangle logic; - ::XmbTextExtents(reinterpret_cast(dw->font->native_handle()), utf8str.c_str(), utf8str.size(), &ink, &logic); + ::XmbTextExtents(reinterpret_cast(dw->font->native_handle()), utf8text.c_str(), utf8text.size(), &ink, &logic); return nana::size(logic.width, logic.height); #endif #endif