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