From 40d4a4cb1a6b4c3c2a486e8f2868f547530e0811 Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Sat, 7 Nov 2020 18:37:57 +0530 Subject: Cleanup: Clang-format. --- .../operations/COM_OutputFileOperation.cpp | 50 +++++++++++++++++----- source/blender/freestyle/intern/stroke/Curve.cpp | 4 +- .../blender/imbuf/intern/openexr/openexr_api.cpp | 10 ++++- source/blender/io/collada/ExtraHandler.cpp | 3 +- source/blender/io/collada/SkinInfo.cpp | 3 +- 5 files changed, 54 insertions(+), 16 deletions(-) (limited to 'source') diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index 9548b137d07..c5623fdbd37 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -53,20 +53,50 @@ void add_exr_channels(void *exrhandle, case COM_DT_VECTOR: IMB_exr_add_channel( exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : nullptr, use_half_float); - IMB_exr_add_channel( - exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : nullptr, use_half_float); - IMB_exr_add_channel( - exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : nullptr, use_half_float); + IMB_exr_add_channel(exrhandle, + layerName, + "Y", + viewName, + 3, + 3 * width, + buf ? buf + 1 : nullptr, + use_half_float); + IMB_exr_add_channel(exrhandle, + layerName, + "Z", + viewName, + 3, + 3 * width, + buf ? buf + 2 : nullptr, + use_half_float); break; case COM_DT_COLOR: IMB_exr_add_channel( exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : nullptr, use_half_float); - IMB_exr_add_channel( - exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : nullptr, use_half_float); - IMB_exr_add_channel( - exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : nullptr, use_half_float); - IMB_exr_add_channel( - exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : nullptr, use_half_float); + IMB_exr_add_channel(exrhandle, + layerName, + "G", + viewName, + 4, + 4 * width, + buf ? buf + 1 : nullptr, + use_half_float); + IMB_exr_add_channel(exrhandle, + layerName, + "B", + viewName, + 4, + 4 * width, + buf ? buf + 2 : nullptr, + use_half_float); + IMB_exr_add_channel(exrhandle, + layerName, + "A", + viewName, + 4, + 4 * width, + buf ? buf + 3 : nullptr, + use_half_float); break; default: break; diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index 95a6b2b3e57..c3dac81477d 100644 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -70,8 +70,8 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) __B = nullptr; float t1 = iA->t2d(); float t2 = iB->t2d(); - if ((iA->A() == iB->A()) && (iA->B() == iB->B()) && (iA->A() != nullptr) && (iA->B() != nullptr) && - (iB->A() != nullptr) && (iB->B() != nullptr)) { + if ((iA->A() == iB->A()) && (iA->B() == iB->B()) && (iA->A() != nullptr) && + (iA->B() != nullptr) && (iB->A() != nullptr) && (iB->B() != nullptr)) { __A = iA->A(); __B = iB->B(); _t2d = t1 + t2 * t3 - t1 * t3; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 70a0585347c..40a502a14db 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -988,8 +988,14 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig GetChannelsInMultiPartFile(*data->ifile, channels); for (size_t i = 0; i < channels.size(); i++) { - IMB_exr_add_channel( - data, nullptr, channels[i].name.c_str(), channels[i].view.c_str(), 0, 0, nullptr, false); + IMB_exr_add_channel(data, + nullptr, + channels[i].name.c_str(), + channels[i].view.c_str(), + 0, + 0, + nullptr, + false); echan = (ExrChannel *)data->channels.last; echan->m->name = channels[i].name; diff --git a/source/blender/io/collada/ExtraHandler.cpp b/source/blender/io/collada/ExtraHandler.cpp index 9bed200676f..8aefb321dd6 100644 --- a/source/blender/io/collada/ExtraHandler.cpp +++ b/source/blender/io/collada/ExtraHandler.cpp @@ -23,7 +23,8 @@ #include "ExtraHandler.h" -ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) : currentExtraTags(nullptr) +ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) + : currentExtraTags(nullptr) { this->dimp = dimp; this->aimp = aimp; diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp index 24ae1f0de11..19a4a4f61c2 100644 --- a/source/blender/io/collada/SkinInfo.cpp +++ b/source/blender/io/collada/SkinInfo.cpp @@ -228,7 +228,8 @@ void SkinInfo::link_armature(bContext *C, Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - ModifierData *md = ED_object_modifier_add(nullptr, bmain, scene, ob, nullptr, eModifierType_Armature); + ModifierData *md = ED_object_modifier_add( + nullptr, bmain, scene, ob, nullptr, eModifierType_Armature); ArmatureModifierData *amd = (ArmatureModifierData *)md; amd->object = ob_arm; -- cgit v1.2.3