From 25f5f8206761d2a4724878544ee895b07b185932 Mon Sep 17 00:00:00 2001 From: houzh <13923402541@gitee.com> Date: Fri, 18 Feb 2022 13:21:07 +0000 Subject: [PATCH] fix cdlogs' warnings,modify 9patch drawing --- src/gui/core/assets.cc | 7 ++++--- src/gui/core/uieventsource.cc | 7 ++++--- src/gui/drawables/ninepatchdrawable.cc | 10 +++++----- src/porting/common/cdlog.cc | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/gui/core/assets.cc b/src/gui/core/assets.cc index 8123e0c5..90a240af 100755 --- a/src/gui/core/assets.cc +++ b/src/gui/core/assets.cc @@ -314,8 +314,9 @@ Drawable* Assets::getDrawable(const std::string&fullresid){ return d; } -#pragma GCC push_options -#pragma GCC optimize("O0") +//#pragma GCC push_options +//#pragma GCC optimize("O0") +//codes between pragma will crashed in ubuntu GCC V8.x,bus GCC V7 wroked well. int Assets::getColor(const std::string&refid){ std::string pkg,name=refid; parseResource(name,nullptr,&pkg); @@ -422,7 +423,7 @@ int Assets::loadKeyValues(const std::string&fullresid,std::function&divHorz,st next=get_pixel(mNinePatch,x+1,edge); if(isStretchableMarker(last)!=isStretchableMarker(next)||(x==width-2)){ bool stretchable=isStretchableMarker(last); - int len=x-pos+(x&divHorz,st next=get_pixel(mNinePatch,edge,y+1); if(isStretchableMarker(last)!=isStretchableMarker(next)||(y==height-2)){ bool stretchable = isStretchableMarker(last); - int len = y - pos+(y