diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /modules/hdr | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
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.
Diffstat (limited to 'modules/hdr')
-rw-r--r-- | modules/hdr/image_loader_hdr.cpp | 4 | ||||
-rw-r--r-- | modules/hdr/image_loader_hdr.h | 1 | ||||
-rw-r--r-- | modules/hdr/register_types.cpp | 2 |
3 files changed, 0 insertions, 7 deletions
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp index c03ae4ab1f..19cd8ae584 100644 --- a/modules/hdr/image_loader_hdr.cpp +++ b/modules/hdr/image_loader_hdr.cpp @@ -34,7 +34,6 @@ #include "core/print_string.h" Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - String header = f->get_token(); ERR_FAIL_COND_V_MSG(header != "#?RADIANCE" && header != "#?RGBE", ERR_FILE_UNRECOGNIZED, "Unsupported header information in HDR: " + header + "."); @@ -68,7 +67,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force imgdata.resize(height * width * sizeof(uint32_t)); { - uint8_t *w = imgdata.ptrw(); uint8_t *ptr = (uint8_t *)w; @@ -123,7 +121,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force //convert for (int i = 0; i < width * height; i++) { - float exp = pow(2.0f, ptr[3] - 128.0f); Color c( @@ -146,7 +143,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force } void ImageLoaderHDR::get_recognized_extensions(List<String> *p_extensions) const { - p_extensions->push_back("hdr"); } diff --git a/modules/hdr/image_loader_hdr.h b/modules/hdr/image_loader_hdr.h index a5f1f9c387..ef8e116616 100644 --- a/modules/hdr/image_loader_hdr.h +++ b/modules/hdr/image_loader_hdr.h @@ -34,7 +34,6 @@ #include "core/io/image_loader.h" class ImageLoaderHDR : public ImageFormatLoader { - public: virtual Error load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale); virtual void get_recognized_extensions(List<String> *p_extensions) const; diff --git a/modules/hdr/register_types.cpp b/modules/hdr/register_types.cpp index 5f2d1578c5..e749928f60 100644 --- a/modules/hdr/register_types.cpp +++ b/modules/hdr/register_types.cpp @@ -35,12 +35,10 @@ static ImageLoaderHDR *image_loader_hdr = nullptr; void register_hdr_types() { - image_loader_hdr = memnew(ImageLoaderHDR); ImageLoader::add_image_format_loader(image_loader_hdr); } void unregister_hdr_types() { - memdelete(image_loader_hdr); } |