Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@ -77,7 +77,6 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t
|
||||
}
|
||||
|
||||
Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome) {
|
||||
|
||||
#define TGA_PUT_PIXEL(r, g, b, a) \
|
||||
int image_data_ofs = ((y * width) + x); \
|
||||
image_data_w[image_data_ofs * 4 + 0] = r; \
|
||||
@ -205,7 +204,6 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
|
||||
}
|
||||
|
||||
Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
|
||||
|
||||
Vector<uint8_t> src_image;
|
||||
int src_image_len = f->get_len();
|
||||
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
|
||||
@ -286,7 +284,6 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
|
||||
const uint8_t *buffer = nullptr;
|
||||
|
||||
if (is_encoded) {
|
||||
|
||||
err = decode_tga_rle(src_image_r, pixel_size, uncompressed_buffer_w, buffer_size);
|
||||
|
||||
if (err == OK) {
|
||||
@ -308,7 +305,6 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
|
||||
}
|
||||
|
||||
void ImageLoaderTGA::get_recognized_extensions(List<String> *p_extensions) const {
|
||||
|
||||
p_extensions->push_back("tga");
|
||||
}
|
||||
|
||||
|
||||
@ -35,12 +35,10 @@
|
||||
static ImageLoaderTGA *image_loader_tga = nullptr;
|
||||
|
||||
void register_tga_types() {
|
||||
|
||||
image_loader_tga = memnew(ImageLoaderTGA);
|
||||
ImageLoader::add_image_format_loader(image_loader_tga);
|
||||
}
|
||||
|
||||
void unregister_tga_types() {
|
||||
|
||||
memdelete(image_loader_tga);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user