fix bugs in Clang
This commit is contained in:
parent
7de258d7a3
commit
3f6742f116
@ -1 +1 @@
|
||||
Subproject commit 1209d487ba12af9cab085c18aa4c3722d8e8f6d0
|
||||
Subproject commit e12425c60d0f4712a93918215834e1ffb7699331
|
@ -142,10 +142,10 @@ private:
|
||||
tla.char_layout_attr=&cla;
|
||||
tla.line_gap=0.1f;
|
||||
|
||||
tl_engine.Set(tile_font->GetFontSource());
|
||||
tl_engine.Set(&tla);
|
||||
tl_engine.SetFont(tile_font->GetFontSource());
|
||||
tl_engine.SetTLA(&tla);
|
||||
tl_engine.SetTextDirection(0);
|
||||
tl_engine.Set(TextAlign::Left);
|
||||
tl_engine.SetAlign(TextAlign::Left);
|
||||
tl_engine.SetMaxWidth(0);
|
||||
tl_engine.SetMaxHeight(0);
|
||||
|
||||
|
@ -156,10 +156,10 @@ namespace hgl
|
||||
|
||||
virtual ~TextLayout()=default;
|
||||
|
||||
void Set (const TextLayoutAttributes *_tla) {if(_tla)memcpy(&tla,_tla,sizeof(TextLayoutAttributes));}
|
||||
void Set (FontSource *fs) {if(fs)font_source=fs;}
|
||||
void SetTLA (const TextLayoutAttributes *_tla) {if(_tla)memcpy(&tla,_tla,sizeof(TextLayoutAttributes));}
|
||||
void SetFont (FontSource *fs) {if(fs)font_source=fs;}
|
||||
void SetTextDirection (const uint8 &td) {tla.text_direction=td;}
|
||||
void Set (const TextAlign &ta) {tla.align=ta;}
|
||||
void SetAlign (const TextAlign &ta) {tla.align=ta;}
|
||||
void SetMaxWidth (const float mw) {tla.max_width=mw;}
|
||||
void SetMaxHeight (const float mh) {tla.max_height=mh;}
|
||||
|
||||
|
@ -205,7 +205,7 @@ public: //Texture
|
||||
bool ChangeTexture2D(Texture2D *tex,void *data,const RectScope2<T> &rs,uint32_t size)
|
||||
{
|
||||
return ChangeTexture2D( tex,
|
||||
buf,
|
||||
data,
|
||||
rs.GetLeft(),
|
||||
rs.GetTop(),
|
||||
rs.GetWidth(),
|
||||
|
@ -167,7 +167,7 @@ Texture2D *CreateTextureFromFile(Device *device,const OSString &filename)
|
||||
VkTexture2DLoader loader(device);
|
||||
|
||||
if(!loader.Load(filename))
|
||||
return(false);
|
||||
return(nullptr);
|
||||
|
||||
return loader.GetTexture();
|
||||
}
|
||||
|
@ -74,10 +74,10 @@ namespace hgl
|
||||
const vulkan::ShaderStage *ss=vsm->GetStageInput(name);
|
||||
|
||||
if(!ss)
|
||||
return(nullptr);
|
||||
return(false);
|
||||
|
||||
if(ss->type.GetStride()*vertices_number!=bytes)
|
||||
return(nullptr);
|
||||
return(false);
|
||||
|
||||
ssb=new ShaderStageBind;
|
||||
|
||||
|
@ -98,7 +98,7 @@ namespace hgl
|
||||
Bitmap2DLoader loader;
|
||||
|
||||
if(!loader.Load(filename))
|
||||
return(false);
|
||||
return(nullptr);
|
||||
|
||||
return loader.GetBitmap();
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ namespace hgl
|
||||
*/
|
||||
TileObject *TileData::Commit(const void *data,const uint bytes,const int ctw,const int cth)
|
||||
{
|
||||
if(!commit_ptr)return(false);
|
||||
if(!commit_ptr)return(nullptr);
|
||||
if(!data||!bytes||ctw<=0||cth<=0)
|
||||
return(nullptr);
|
||||
|
||||
|
@ -154,7 +154,7 @@ VK_NAMESPACE_BEGIN
|
||||
||memcmp(origin_filedata,SHADER_FILE_HEADER,SHADER_FILE_HEADER_BYTES))
|
||||
{
|
||||
delete[] origin_filedata;
|
||||
return(false);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
const uint8 *filedata=origin_filedata;
|
||||
@ -187,4 +187,4 @@ VK_NAMESPACE_BEGIN
|
||||
|
||||
return sr;
|
||||
}
|
||||
VK_NAMESPACE_END
|
||||
VK_NAMESPACE_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user