Cleanup: Clang-Tidy modernize-use-nullptr

Replace `NULL` with `nullptr` in C++ code.

No functional changes.
This commit is contained in:
2020-11-06 17:49:09 +01:00
parent 88926375a0
commit 16732def37
426 changed files with 7145 additions and 7146 deletions

View File

@@ -116,7 +116,7 @@ static bool is_object_keyframe(Object *ob, int frame_index)
static void add_keyframes_from(bAction *action, BCFrameSet &frameset)
{
if (action) {
FCurve *fcu = NULL;
FCurve *fcu = nullptr;
for (fcu = (FCurve *)action->curves.first; fcu; fcu = fcu->next) {
BezTriple *bezt = fcu->bezt;
for (int i = 0; i < fcu->totvert; bezt++, i++) {
@@ -237,7 +237,7 @@ bool BCAnimationSampler::is_animated_by_constraint(Object *ob,
{
bConstraint *con;
for (con = (bConstraint *)conlist->first; con; con = con->next) {
ListBase targets = {NULL, NULL};
ListBase targets = {nullptr, nullptr};
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
@@ -468,7 +468,7 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object *
}
/* Add curves on Object->data actions */
action = NULL;
action = nullptr;
if (ob->type == OB_CAMERA) {
action = bc_getSceneCameraAction(ob);
object_type = BC_ANIMATION_TYPE_CAMERA;
@@ -520,7 +520,7 @@ const BCSample *BCSampleFrame::get_sample(Object *ob) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
return NULL;
return nullptr;
}
return it->second;
}
@@ -529,7 +529,7 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
return NULL;
return nullptr;
}
BCSample *sample = it->second;
return &sample->get_matrix();
@@ -540,7 +540,7 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob, Bone *bone) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
return NULL;
return nullptr;
}
BCSample *sample = it->second;
@@ -577,7 +577,7 @@ BCSample &BCSampleFrameContainer::add(Object *ob, int frame_index)
BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index)
{
BCSampleFrameMap::iterator it = sample_frames.find(frame_index);
BCSampleFrame *frame = (it == sample_frames.end()) ? NULL : &it->second;
BCSampleFrame *frame = (it == sample_frames.end()) ? nullptr : &it->second;
return frame;
}