Cleanup: Clang-format.

This commit is contained in:
Ankit Meel 2020-11-07 18:37:57 +05:30
parent 6e6b5e147c
commit 40d4a4cb1a
5 changed files with 54 additions and 16 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;