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:
parent
710b34b702
commit
0be6d925dc
1552 changed files with 1 additions and 33876 deletions
|
|
@ -37,7 +37,6 @@
|
|||
#include <string.h>
|
||||
|
||||
Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p_buffer_len) {
|
||||
|
||||
jpgd::jpeg_decoder_mem_stream mem_stream(p_buffer, p_buffer_len);
|
||||
|
||||
jpgd::jpeg_decoder decoder(&mem_stream);
|
||||
|
|
@ -102,7 +101,6 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
|
|||
}
|
||||
|
||||
Error ImageLoaderJPG::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);
|
||||
|
|
@ -120,13 +118,11 @@ Error ImageLoaderJPG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
|
|||
}
|
||||
|
||||
void ImageLoaderJPG::get_recognized_extensions(List<String> *p_extensions) const {
|
||||
|
||||
p_extensions->push_back("jpg");
|
||||
p_extensions->push_back("jpeg");
|
||||
}
|
||||
|
||||
static Ref<Image> _jpegd_mem_loader_func(const uint8_t *p_png, int p_size) {
|
||||
|
||||
Ref<Image> img;
|
||||
img.instance();
|
||||
Error err = jpeg_load_image_from_buffer(img.ptr(), p_png, p_size);
|
||||
|
|
@ -135,6 +131,5 @@ static Ref<Image> _jpegd_mem_loader_func(const uint8_t *p_png, int p_size) {
|
|||
}
|
||||
|
||||
ImageLoaderJPG::ImageLoaderJPG() {
|
||||
|
||||
Image::_jpg_mem_loader_func = _jpegd_mem_loader_func;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue