From f16f2c63fab52cffc9433222d582f7c36b894a99 Mon Sep 17 00:00:00 2001 From: xucheng57 Date: Fri, 8 Apr 2022 11:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=84=E5=8C=BA=E4=BB=A3=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=90=88=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xucheng57 --- frameworks/render/render_base.h | 5 +++-- test/uitest/test_vector_font/ui_test_vector_font.cpp | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frameworks/render/render_base.h b/frameworks/render/render_base.h index e29c9db..f7a901b 100644 --- a/frameworks/render/render_base.h +++ b/frameworks/render/render_base.h @@ -23,7 +23,6 @@ #ifndef GRAPHIC_LITE_RENDER_BASE_H #define GRAPHIC_LITE_RENDER_BASE_H -#include #include "gfx_utils/diagram/common/common_basics.h" #include "render/render_buffer.h" @@ -216,7 +215,9 @@ public: void BlendHLine(int32_t x1, int32_t y, int32_t x2, const ColorType& color, uint8_t cover) { if (x1 > x2) { - std::swap(x1, x2); + int32_t swapTemp = x1; + x1 = x2; + x2 = swapTemp; } if (y > GetYMax() || y < GetYMin() || x1 > GetXMax() || x2 < GetXMin()) { return; diff --git a/test/uitest/test_vector_font/ui_test_vector_font.cpp b/test/uitest/test_vector_font/ui_test_vector_font.cpp index f983b75..3b6020c 100644 --- a/test/uitest/test_vector_font/ui_test_vector_font.cpp +++ b/test/uitest/test_vector_font/ui_test_vector_font.cpp @@ -15,8 +15,6 @@ #include "ui_test_vector_font.h" #if ENABLE_VECTOR_FONT -#include - #include "common/screen.h" #include "components/ui_label.h" #if ENABLE_MULTI_FONT -- GitLab