1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Style: Apply clang-tidy to current code, add readability-redundant-member-init

This commit is contained in:
Rémi Verschelde
2022-04-04 18:49:05 +02:00
parent 1abb5ebf65
commit b78aa4fe19
13 changed files with 23 additions and 40 deletions

View File

@@ -486,7 +486,7 @@ _FORCE_INLINE_ TextServerFallback::FontGlyph TextServerFallback::rasterize_msdf(
if (RenderingServer::get_singleton() != nullptr) {
Ref<Image> img;
img.instantiate();
img->create_from_data(tex.texture_w, tex.texture_h, 0, Image::FORMAT_RGBA8, tex.imgdata);
img->create_from_data(tex.texture_w, tex.texture_h, false, Image::FORMAT_RGBA8, tex.imgdata);
if (tex.texture.is_null()) {
tex.texture.instantiate();
tex.texture->create_from_image(img);
@@ -571,7 +571,7 @@ _FORCE_INLINE_ TextServerFallback::FontGlyph TextServerFallback::rasterize_bitma
if (RenderingServer::get_singleton() != nullptr) {
Ref<Image> img;
img.instantiate();
img->create_from_data(tex.texture_w, tex.texture_h, 0, require_format, tex.imgdata);
img->create_from_data(tex.texture_w, tex.texture_h, false, require_format, tex.imgdata);
if (tex.texture.is_null()) {
tex.texture.instantiate();
@@ -1467,7 +1467,7 @@ void TextServerFallback::font_set_texture_image(const RID &p_font_rid, const Vec
Ref<Image> img;
img.instantiate();
img->create_from_data(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata);
img->create_from_data(tex.texture_w, tex.texture_h, false, tex.format, tex.imgdata);
tex.texture = Ref<ImageTexture>();
tex.texture.instantiate();
@@ -1486,7 +1486,7 @@ Ref<Image> TextServerFallback::font_get_texture_image(const RID &p_font_rid, con
const FontTexture &tex = fd->cache[size]->textures[p_texture_index];
Ref<Image> img;
img.instantiate();
img->create_from_data(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata);
img->create_from_data(tex.texture_w, tex.texture_h, false, tex.format, tex.imgdata);
return img;
}