Cleanup: use C++ comments for disabled code

This commit is contained in:
Campbell Barton 2023-09-25 16:56:17 +10:00
parent acb88528a5
commit e38ff7c06d
119 changed files with 296 additions and 278 deletions

@ -814,14 +814,14 @@ BVHNode *BVHBuild::build_node(const BVHRange &range,
BVHMixedSplit unaligned_split; BVHMixedSplit unaligned_split;
float unalignedSplitSAH = FLT_MAX; float unalignedSplitSAH = FLT_MAX;
/* float unalignedLeafSAH = FLT_MAX; */ // float unalignedLeafSAH = FLT_MAX;
Transform aligned_space; Transform aligned_space;
bool do_unalinged_split = false; bool do_unalinged_split = false;
if (params.use_unaligned_nodes && splitSAH > params.unaligned_split_threshold * leafSAH) { if (params.use_unaligned_nodes && splitSAH > params.unaligned_split_threshold * leafSAH) {
aligned_space = unaligned_heuristic.compute_aligned_space(range, &references.at(0)); aligned_space = unaligned_heuristic.compute_aligned_space(range, &references.at(0));
unaligned_split = BVHMixedSplit( unaligned_split = BVHMixedSplit(
this, storage, range, references, level, &unaligned_heuristic, &aligned_space); this, storage, range, references, level, &unaligned_heuristic, &aligned_space);
/* unalignedLeafSAH = params.sah_primitive_cost * split.leafSAH; */ // unalignedLeafSAH = params.sah_primitive_cost * split.leafSAH;
unalignedSplitSAH = params.sah_node_cost * unaligned_split.bounds.half_area() + unalignedSplitSAH = params.sah_node_cost * unaligned_split.bounds.half_area() +
params.sah_primitive_cost * unaligned_split.nodeSAH; params.sah_primitive_cost * unaligned_split.nodeSAH;
/* TODO(sergey): Check we can create leaf already. */ /* TODO(sergey): Check we can create leaf already. */

@ -128,10 +128,10 @@ ccl_device_inline float3 sample_uniform_cone(const float3 N,
float2 xy = sample_uniform_disk(rand); float2 xy = sample_uniform_disk(rand);
const float r2 = len_squared(xy); const float r2 = len_squared(xy);
/* Equivalent to `mix(cos_angle, 1.0f, 1.0f - r2)` */ /* Equivalent to `mix(cos_angle, 1.0f, 1.0f - r2)`. */
*cos_theta = 1.0f - r2 * one_minus_cos_angle; *cos_theta = 1.0f - r2 * one_minus_cos_angle;
/* Remap disk radius to cone radius, equivalent to `xy *= sin_theta / sqrt(r2); */ /* Remap disk radius to cone radius, equivalent to `xy *= sin_theta / sqrt(r2)`. */
xy *= safe_sqrtf(one_minus_cos_angle * (2.0f - one_minus_cos_angle * r2)); xy *= safe_sqrtf(one_minus_cos_angle * (2.0f - one_minus_cos_angle * r2));
*pdf = M_1_2PI_F / one_minus_cos_angle; *pdf = M_1_2PI_F / one_minus_cos_angle;

@ -69,8 +69,8 @@ ccl_device void differential_dudv(ccl_private differential *du,
* and the same for dudy and dvdy. the denominator is the same for both * and the same for dudy and dvdy. the denominator is the same for both
* solutions, so we compute it only once. * solutions, so we compute it only once.
* *
* dP.dx = dPdu * dudx + dPdv * dvdx; * `dP.dx = dPdu * dudx + dPdv * dvdx;`
* dP.dy = dPdu * dudy + dPdv * dvdy; */ * `dP.dy = dPdu * dudy + dPdv * dvdy;` */
float det = (dPdu.x * dPdv.y - dPdv.x * dPdu.y); float det = (dPdu.x * dPdv.y - dPdv.x * dPdu.y);

@ -155,7 +155,7 @@ static CPUCapabilities &system_cpu_capabilities()
const bool ssse3 = (result[2] & ((int)1 << 9)) != 0; const bool ssse3 = (result[2] & ((int)1 << 9)) != 0;
const bool sse41 = (result[2] & ((int)1 << 19)) != 0; const bool sse41 = (result[2] & ((int)1 << 19)) != 0;
/* const bool sse42 = (result[2] & ((int)1 << 20)) != 0; */ // const bool sse42 = (result[2] & ((int)1 << 20)) != 0;
const bool fma3 = (result[2] & ((int)1 << 12)) != 0; const bool fma3 = (result[2] & ((int)1 << 12)) != 0;
const bool os_uses_xsave_xrestore = (result[2] & ((int)1 << 27)) != 0; const bool os_uses_xsave_xrestore = (result[2] & ((int)1 << 27)) != 0;

@ -121,7 +121,7 @@ struct ClothVertex {
struct ClothSpring { struct ClothSpring {
int ij; /* `Pij` from the paper, one end of the spring. */ int ij; /* `Pij` from the paper, one end of the spring. */
int kl; /* `Pkl` from the paper, one end of the spring. */ int kl; /* `Pkl` from the paper, one end of the spring. */
int mn; /* For hair springs: third vertex index; For bending springs: edge index; */ int mn; /* For hair springs: third vertex index; For bending springs: edge index. */
int *pa; /* Array of vert indices for poly a (for bending springs). */ int *pa; /* Array of vert indices for poly a (for bending springs). */
int *pb; /* Array of vert indices for poly b (for bending springs). */ int *pb; /* Array of vert indices for poly b (for bending springs). */
int la; /* Length of `*pa`. */ int la; /* Length of `*pa`. */

@ -110,8 +110,8 @@ struct CCGVert {
CCGEdge **edges; CCGEdge **edges;
CCGFace **faces; CCGFace **faces;
/* byte *levelData; */ // byte *levelData;
/* byte *user_data; */ // byte *user_data;
}; };
struct CCGEdge { struct CCGEdge {
@ -124,8 +124,8 @@ struct CCGEdge {
CCGVert *v0, *v1; CCGVert *v0, *v1;
CCGFace **faces; CCGFace **faces;
/* byte *levelData; */ // byte *levelData;
/* byte *user_data; */ // byte *user_data;
}; };
struct CCGFace { struct CCGFace {
@ -135,11 +135,11 @@ struct CCGFace {
short numVerts, flags; short numVerts, flags;
int osd_index; int osd_index;
/* CCGVert **verts; */ // CCGVert **verts;
/* CCGEdge **edges; */ // CCGEdge **edges;
/* byte *centerData; */ // byte *centerData;
/* byte **gridData; */ // byte **gridData;
/* byte *user_data; */ // byte *user_data;
}; };
typedef enum { typedef enum {

@ -1406,7 +1406,7 @@ void BKE_histogram_update_sample_line(Histogram *hist,
hist->channels = 3; hist->channels = 3;
hist->x_resolution = 256; hist->x_resolution = 256;
hist->xmax = 1.0f; hist->xmax = 1.0f;
/* hist->ymax = 1.0f; */ /* now do this on the operator _only_ */ // hist->ymax = 1.0f; /* now do this on the operator _only_ */
if (ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr) { if (ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr) {
return; return;

@ -5459,37 +5459,37 @@ static short CTI_INIT = 1; /* when non-zero, the list needs to be updated */
/* This function only gets called when CTI_INIT is non-zero */ /* This function only gets called when CTI_INIT is non-zero */
static void constraints_init_typeinfo() static void constraints_init_typeinfo()
{ {
constraintsTypeInfo[0] = nullptr; /* 'Null' Constraint */ constraintsTypeInfo[0] = nullptr; /* 'Null' Constraint */
constraintsTypeInfo[1] = &CTI_CHILDOF; /* ChildOf Constraint */ constraintsTypeInfo[1] = &CTI_CHILDOF; /* ChildOf Constraint */
constraintsTypeInfo[2] = &CTI_TRACKTO; /* TrackTo Constraint */ constraintsTypeInfo[2] = &CTI_TRACKTO; /* TrackTo Constraint */
constraintsTypeInfo[3] = &CTI_KINEMATIC; /* IK Constraint */ constraintsTypeInfo[3] = &CTI_KINEMATIC; /* IK Constraint */
constraintsTypeInfo[4] = &CTI_FOLLOWPATH; /* Follow-Path Constraint */ constraintsTypeInfo[4] = &CTI_FOLLOWPATH; /* Follow-Path Constraint */
constraintsTypeInfo[5] = &CTI_ROTLIMIT; /* Limit Rotation Constraint */ constraintsTypeInfo[5] = &CTI_ROTLIMIT; /* Limit Rotation Constraint */
constraintsTypeInfo[6] = &CTI_LOCLIMIT; /* Limit Location Constraint */ constraintsTypeInfo[6] = &CTI_LOCLIMIT; /* Limit Location Constraint */
constraintsTypeInfo[7] = &CTI_SIZELIMIT; /* Limit Scale Constraint */ constraintsTypeInfo[7] = &CTI_SIZELIMIT; /* Limit Scale Constraint */
constraintsTypeInfo[8] = &CTI_ROTLIKE; /* Copy Rotation Constraint */ constraintsTypeInfo[8] = &CTI_ROTLIKE; /* Copy Rotation Constraint */
constraintsTypeInfo[9] = &CTI_LOCLIKE; /* Copy Location Constraint */ constraintsTypeInfo[9] = &CTI_LOCLIKE; /* Copy Location Constraint */
constraintsTypeInfo[10] = &CTI_SIZELIKE; /* Copy Scale Constraint */ constraintsTypeInfo[10] = &CTI_SIZELIKE; /* Copy Scale Constraint */
constraintsTypeInfo[11] = &CTI_PYTHON; /* Python/Script Constraint */ constraintsTypeInfo[11] = &CTI_PYTHON; /* Python/Script Constraint */
constraintsTypeInfo[12] = &CTI_ACTION; /* Action Constraint */ constraintsTypeInfo[12] = &CTI_ACTION; /* Action Constraint */
constraintsTypeInfo[13] = &CTI_LOCKTRACK; /* Locked-Track Constraint */ constraintsTypeInfo[13] = &CTI_LOCKTRACK; /* Locked-Track Constraint */
constraintsTypeInfo[14] = &CTI_DISTLIMIT; /* Limit Distance Constraint */ constraintsTypeInfo[14] = &CTI_DISTLIMIT; /* Limit Distance Constraint */
constraintsTypeInfo[15] = &CTI_STRETCHTO; /* StretchTo Constraint */ constraintsTypeInfo[15] = &CTI_STRETCHTO; /* StretchTo Constraint */
constraintsTypeInfo[16] = &CTI_MINMAX; /* Floor Constraint */ constraintsTypeInfo[16] = &CTI_MINMAX; /* Floor Constraint */
/* constraintsTypeInfo[17] = &CTI_RIGIDBODYJOINT; */ /* RigidBody Constraint - Deprecated */ constraintsTypeInfo[17] = nullptr; /* RigidBody Constraint: DEPRECATED. */
constraintsTypeInfo[18] = &CTI_CLAMPTO; /* ClampTo Constraint */ constraintsTypeInfo[18] = &CTI_CLAMPTO; /* ClampTo Constraint */
constraintsTypeInfo[19] = &CTI_TRANSFORM; /* Transformation Constraint */ constraintsTypeInfo[19] = &CTI_TRANSFORM; /* Transformation Constraint */
constraintsTypeInfo[20] = &CTI_SHRINKWRAP; /* Shrinkwrap Constraint */ constraintsTypeInfo[20] = &CTI_SHRINKWRAP; /* Shrinkwrap Constraint */
constraintsTypeInfo[21] = &CTI_DAMPTRACK; /* Damped TrackTo Constraint */ constraintsTypeInfo[21] = &CTI_DAMPTRACK; /* Damped TrackTo Constraint */
constraintsTypeInfo[22] = &CTI_SPLINEIK; /* Spline IK Constraint */ constraintsTypeInfo[22] = &CTI_SPLINEIK; /* Spline IK Constraint */
constraintsTypeInfo[23] = &CTI_TRANSLIKE; /* Copy Transforms Constraint */ constraintsTypeInfo[23] = &CTI_TRANSLIKE; /* Copy Transforms Constraint */
constraintsTypeInfo[24] = &CTI_SAMEVOL; /* Maintain Volume Constraint */ constraintsTypeInfo[24] = &CTI_SAMEVOL; /* Maintain Volume Constraint */
constraintsTypeInfo[25] = &CTI_PIVOT; /* Pivot Constraint */ constraintsTypeInfo[25] = &CTI_PIVOT; /* Pivot Constraint */
constraintsTypeInfo[26] = &CTI_FOLLOWTRACK; /* Follow Track Constraint */ constraintsTypeInfo[26] = &CTI_FOLLOWTRACK; /* Follow Track Constraint */
constraintsTypeInfo[27] = &CTI_CAMERASOLVER; /* Camera Solver Constraint */ constraintsTypeInfo[27] = &CTI_CAMERASOLVER; /* Camera Solver Constraint */
constraintsTypeInfo[28] = &CTI_OBJECTSOLVER; /* Object Solver Constraint */ constraintsTypeInfo[28] = &CTI_OBJECTSOLVER; /* Object Solver Constraint */
constraintsTypeInfo[29] = &CTI_TRANSFORM_CACHE; /* Transform Cache Constraint */ constraintsTypeInfo[29] = &CTI_TRANSFORM_CACHE; /* Transform Cache Constraint */
constraintsTypeInfo[30] = &CTI_ARMATURE; /* Armature Constraint */ constraintsTypeInfo[30] = &CTI_ARMATURE; /* Armature Constraint */
} }
const bConstraintTypeInfo *BKE_constraint_typeinfo_from_type(int type) const bConstraintTypeInfo *BKE_constraint_typeinfo_from_type(int type)

@ -2154,8 +2154,8 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
nr = bl->nr; nr = bl->nr;
if (bl->poly == -1) { /* check its not cyclic */ if (bl->poly == -1) { /* check its not cyclic */
/* skip the first point */ /* Skip the first point. */
/* bevp0 = bevp1; */ // bevp0 = bevp1;
bevp1 = bevp2; bevp1 = bevp2;
bevp2++; bevp2++;
nr--; nr--;
@ -2184,7 +2184,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
interp_qt_qtqt(bevp1->quat, bevp1->quat, q, 0.5); interp_qt_qtqt(bevp1->quat, bevp1->quat, q, 0.5);
normalize_qt(bevp1->quat); normalize_qt(bevp1->quat);
/* bevp0 = bevp1; */ /* UNUSED */ // bevp0 = bevp1; /* UNUSED */
bevp1 = bevp2; bevp1 = bevp2;
bevp2++; bevp2++;
} }
@ -2385,7 +2385,7 @@ static void make_bevel_list_3D_tangent(BevList *bl)
normalize_v3(cross_tmp); normalize_v3(cross_tmp);
tri_to_quat(bevp1->quat, zero, cross_tmp, bevp1->tan); /* XXX: could be faster. */ tri_to_quat(bevp1->quat, zero, cross_tmp, bevp1->tan); /* XXX: could be faster. */
/* bevp0 = bevp1; */ /* UNUSED */ // bevp0 = bevp1; /* UNUSED */
bevp1 = bevp2; bevp1 = bevp2;
bevp2++; bevp2++;
} }

@ -1609,7 +1609,7 @@ static void icu_to_fcurves(ID *id,
if (((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) || if (((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z))) ((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)))
{ {
const float fac = float(M_PI) / 18.0f; /* 10.0f * M_PI/180.0f; */ const float fac = float(M_PI) / 18.0f; /* `10.0f * M_PI/180.0f`. */
dst->vec[0][1] *= fac; dst->vec[0][1] *= fac;
dst->vec[1][1] *= fac; dst->vec[1][1] *= fac;

@ -461,7 +461,11 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float t[4], int cycl)
k1 = k[0] = k[1] = k[2] = k[3] = firstkey; k1 = k[0] = k[1] = k[2] = k[3] = firstkey;
t[0] = t[1] = t[2] = t[3] = k1->pos; t[0] = t[1] = t[2] = t[3] = k1->pos;
/* if (fac < 0.0 || fac > 1.0) return 1; */ #if 0
if (fac < 0.0 || fac > 1.0) {
return 1;
}
#endif
if (k1->next == nullptr) { if (k1->next == nullptr) {
return 1; return 1;
@ -479,7 +483,7 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float t[4], int cycl)
} }
k1 = k1->next; k1 = k1->next;
} }
/* k1 = k[1]; */ /* UNUSED */ // k1 = k[1]; /* UNUSED */
t[0] = k[0]->pos; t[0] = k[0]->pos;
t[1] += dpos; t[1] += dpos;
t[2] = k[2]->pos + dpos; t[2] = k[2]->pos + dpos;

@ -1830,7 +1830,7 @@ void BKE_mask_layer_shape_changed_add(MaskLayer *masklay,
const int pi_next = (spline_point_index + 1) % spline->tot_point; const int pi_next = (spline_point_index + 1) % spline->tot_point;
const int index_offset = index - spline_point_index; const int index_offset = index - spline_point_index;
/* const int pi_curr_abs = index; */ // const int pi_curr_abs = index;
const int pi_prev_abs = pi_prev + index_offset; const int pi_prev_abs = pi_prev + index_offset;
const int pi_next_abs = pi_next + index_offset; const int pi_next_abs = pi_next + index_offset;

@ -517,16 +517,16 @@ static float (
point_curr = point_prev + 1; point_curr = point_prev + 1;
while (a--) { while (a--) {
/* BezTriple *bezt_prev; */ /* UNUSED */ // BezTriple *bezt_prev; /* UNUSED */
/* BezTriple *bezt_curr; */ /* UNUSED */ // BezTriple *bezt_curr; /* UNUSED */
int j; int j;
if (a == 0 && (spline->flag & MASK_SPLINE_CYCLIC)) { if (a == 0 && (spline->flag & MASK_SPLINE_CYCLIC)) {
point_curr = points_array; point_curr = points_array;
} }
/* bezt_prev = &point_prev->bezt; */ // bezt_prev = &point_prev->bezt;
/* bezt_curr = &point_curr->bezt; */ // bezt_curr = &point_curr->bezt;
for (j = 0; j < resol; j++, fp++) { for (j = 0; j < resol; j++, fp++) {
float u = float(j) / resol, weight; float u = float(j) / resol, weight;

@ -279,11 +279,11 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather
for (k = 0; k < tot_diff_point; k++) { for (k = 0; k < tot_diff_point; k++) {
/* co_prev = diff_points[k_prev]; */ /* precalc */ // co_prev = diff_points[k_prev]; /* Precalculate. */
co_curr = diff_points[k_curr]; co_curr = diff_points[k_curr];
co_next = diff_points[k_next]; co_next = diff_points[k_next];
// sub_v2_v2v2(d_prev, co_prev, co_curr); /* precalc */ // sub_v2_v2v2(d_prev, co_prev, co_curr); /* Precalculate. */
sub_v2_v2v2(d_next, co_curr, co_next); sub_v2_v2v2(d_next, co_curr, co_next);
// normalize_v2(d_prev); /* precalc */ // normalize_v2(d_prev); /* precalc */
@ -303,7 +303,7 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather
/* use next iter */ /* use next iter */
copy_v2_v2(d_prev, d_next); copy_v2_v2(d_prev, d_next);
/* k_prev = k_curr; */ /* precalc */ // k_prev = k_curr; /* Precalculate. */
k_curr = k_next; k_curr = k_next;
k_next++; k_next++;
} }

@ -308,7 +308,7 @@ int BKE_packedfile_write_to_file(ReportList *reports,
bool remove_tmp = false; bool remove_tmp = false;
char filepath[FILE_MAX]; char filepath[FILE_MAX];
char filepath_temp[FILE_MAX]; char filepath_temp[FILE_MAX];
/* void *data; */ // void *data;
STRNCPY(filepath, filepath_rel); STRNCPY(filepath, filepath_rel);
BLI_path_abs(filepath, ref_file_name); BLI_path_abs(filepath, ref_file_name);

@ -741,7 +741,7 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i
maxw = BLI_kdtree_3d_find_nearest_n(ctx->tree, orco1, ptn, 3); maxw = BLI_kdtree_3d_find_nearest_n(ctx->tree, orco1, ptn, 3);
maxd = ptn[maxw - 1].dist; maxd = ptn[maxw - 1].dist;
/* mind=ptn[0].dist; */ /* UNUSED */ // mind=ptn[0].dist; /* UNUSED */
/* the weights here could be done better */ /* the weights here could be done better */
for (w = 0; w < maxw; w++) { for (w = 0; w < maxw; w++) {

@ -1189,7 +1189,7 @@ static void pbvh_bmesh_split_edge(EdgeQueueContext *eq_ctx,
v_tri[0] = v_new; v_tri[0] = v_new;
v_tri[1] = v2; v_tri[1] = v2;
/* v_tri[2] = v_opp; */ /* unchanged */ // v_tri[2] = v_opp; /* Unchanged. */
e_tri[0] = BM_edge_create(pbvh->header.bm, v_tri[0], v_tri[1], nullptr, BM_CREATE_NO_DOUBLE); e_tri[0] = BM_edge_create(pbvh->header.bm, v_tri[0], v_tri[1], nullptr, BM_CREATE_NO_DOUBLE);
e_tri[2] = e_tri[1]; /* switched */ e_tri[2] = e_tri[1]; /* switched */
e_tri[1] = BM_edge_create(pbvh->header.bm, v_tri[1], v_tri[2], nullptr, BM_CREATE_NO_DOUBLE); e_tri[1] = BM_edge_create(pbvh->header.bm, v_tri[1], v_tri[2], nullptr, BM_CREATE_NO_DOUBLE);

@ -2780,7 +2780,7 @@ bool BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
void BKE_ptcache_id_time( void BKE_ptcache_id_time(
PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale) PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
{ {
/* Object *ob; */ /* UNUSED */ // Object *ob; /* UNUSED */
PointCache *cache; PointCache *cache;
/* float offset; unused for now */ /* float offset; unused for now */
float time, nexttime; float time, nexttime;

@ -259,7 +259,7 @@ bSound *BKE_sound_new_file(Main *bmain, const char *filepath)
sound = static_cast<bSound *>(BKE_libblock_alloc(bmain, ID_SO, BLI_path_basename(filepath), 0)); sound = static_cast<bSound *>(BKE_libblock_alloc(bmain, ID_SO, BLI_path_basename(filepath), 0));
STRNCPY(sound->filepath, filepath); STRNCPY(sound->filepath, filepath);
/* sound->type = SOUND_TYPE_FILE; */ /* XXX unused currently */ // sound->type = SOUND_TYPE_FILE; /* UNUSED. */
/* Extract sound specs for bSound */ /* Extract sound specs for bSound */
SoundInfo info; SoundInfo info;

@ -990,7 +990,7 @@ static void ccgDM_copyFinalPolyArray(DerivedMesh *dm, int *r_face_offsets)
int index; int index;
int totface; int totface;
int gridSize = ccgSubSurf_getGridSize(ss); int gridSize = ccgSubSurf_getGridSize(ss);
/* int edgeSize = ccgSubSurf_getEdgeSize(ss); */ /* UNUSED */ // int edgeSize = ccgSubSurf_getEdgeSize(ss); /* UNUSED. */
int i = 0, k = 0; int i = 0, k = 0;
totface = ccgSubSurf_getNumFaces(ss); totface = ccgSubSurf_getNumFaces(ss);

@ -408,7 +408,7 @@ static void text_from_buf(Text *text, const uchar *buffer, const int len)
cleanup_textline(tmp); cleanup_textline(tmp);
BLI_addtail(&text->lines, tmp); BLI_addtail(&text->lines, tmp);
/* lines_count += 1; */ /* UNUSED */ // lines_count += 1; /* UNUSED. */
} }
text->curl = text->sell = static_cast<TextLine *>(text->lines.first); text->curl = text->sell = static_cast<TextLine *>(text->lines.first);
@ -2221,7 +2221,7 @@ int txt_setcurr_tab_spaces(Text *text, int space)
} }
while (text->curl->line[i] == indent) { while (text->curl->line[i] == indent) {
/* We only count those tabs/spaces that are before any text or before the curs; */ /* We only count those tabs/spaces that are before any text or before the `curs`. */
if (i == text->curc) { if (i == text->curc) {
return i; return i;
} }

@ -354,11 +354,11 @@ VChar *BKE_vfontdata_char_from_freetypefont(VFont *vfont, ulong character)
return nullptr; return nullptr;
} }
/* Init Freetype */ /* Initialize Freetype. */
FT_Library library = nullptr; FT_Library library = nullptr;
FT_Error err = FT_Init_FreeType(&library); FT_Error err = FT_Init_FreeType(&library);
if (err) { if (err) {
/* XXX error("Failed to load the Freetype font library"); */ // error("Failed to load the Freetype font library");
return nullptr; return nullptr;
} }

@ -317,15 +317,15 @@ template<typename T>
QuaternionBase<T> R = q * V * conjugate(q); QuaternionBase<T> R = q * V * conjugate(q);
return {R.x, R.y, R.z}; return {R.x, R.y, R.z};
#else #else
/* `S = q * V` */ /* `S = q * V`. */
QuaternionBase<T> S; QuaternionBase<T> S;
S.w = /* q.w * 0.0 */ -q.x * v.x - q.y * v.y - q.z * v.z; S.w = /* q.w * 0.0 */ -q.x * v.x - q.y * v.y - q.z * v.z;
S.x = q.w * v.x /* + q.x * 0.0 */ + q.y * v.z - q.z * v.y; S.x = q.w * v.x /* + q.x * 0.0 */ + q.y * v.z - q.z * v.y;
S.y = q.w * v.y /* + q.y * 0.0 */ + q.z * v.x - q.x * v.z; S.y = q.w * v.y /* + q.y * 0.0 */ + q.z * v.x - q.x * v.z;
S.z = q.w * v.z /* + q.z * 0.0 */ + q.x * v.y - q.y * v.x; S.z = q.w * v.z /* + q.z * 0.0 */ + q.x * v.y - q.y * v.x;
/* `R = S * conjugate(q)` */ /* `R = S * conjugate(q)`. */
VecBase<T, 3> R; VecBase<T, 3> R;
/* R.w = S.w * q.w + S.x * q.x + S.y * q.y + S.z * q.z = 0.0; */ /* `R.w = S.w * q.w + S.x * q.x + S.y * q.y + S.z * q.z = 0.0`. */
R.x = S.w * -q.x + S.x * q.w - S.y * q.z + S.z * q.y; R.x = S.w * -q.x + S.x * q.w - S.y * q.z + S.z * q.y;
R.y = S.w * -q.y + S.y * q.w - S.z * q.x + S.x * q.z; R.y = S.w * -q.y + S.y * q.w - S.z * q.x + S.x * q.z;
R.z = S.w * -q.z + S.z * q.w - S.x * q.y + S.y * q.x; R.z = S.w * -q.z + S.z * q.w - S.x * q.y + S.y * q.x;

@ -68,7 +68,7 @@ void *BLI_smallhash_iternew(const SmallHash *sh, SmallHashIter *iter, uintptr_t
ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT; ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr_t *key) void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr_t *key)
ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT; ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
/* void BLI_smallhash_print(SmallHash *sh); */ /* UNUSED */ // void BLI_smallhash_print(SmallHash *sh); /* UNUSED. */
#ifdef DEBUG #ifdef DEBUG
/** /**

@ -327,9 +327,9 @@ bool _bli_array_iter_spiral_square(const void *arr_v,
bool check_bounds = steps > steps_in; bool check_bounds = steps > steps_in;
/* sign: 0 neg; 1 pos; */ /* Sign: 0=negative 1=positive. */
for (int sign = 2; sign--;) { for (int sign = 2; sign--;) {
/* axis: 0 x; 1 y; */ /* Axis: 0=x; 1=y. */
for (int axis = 2; axis--;) { for (int axis = 2; axis--;) {
int ofs_step = stride[axis]; int ofs_step = stride[axis];
if (!sign) { if (!sign) {

@ -5251,9 +5251,9 @@ void vcloud_estimate_transform_v3(const int list_size,
/* build 'projection' matrix */ /* build 'projection' matrix */
for (a = 0; a < list_size; a++) { for (a = 0; a < list_size; a++) {
sub_v3_v3v3(va, rpos[a], accu_rcom); sub_v3_v3v3(va, rpos[a], accu_rcom);
/* mul_v3_fl(va, bp->mass); mass needs re-normalization here ?? */ // mul_v3_fl(va, bp->mass); /* Mass needs re-normalization here? */
sub_v3_v3v3(vb, pos[a], accu_com); sub_v3_v3v3(vb, pos[a], accu_com);
/* mul_v3_fl(va, rp->mass); */ // mul_v3_fl(va, rp->mass);
m[0][0] += va[0] * vb[0]; m[0][0] += va[0] * vb[0];
m[0][1] += va[0] * vb[1]; m[0][1] += va[0] * vb[1];
m[0][2] += va[0] * vb[2]; m[0][2] += va[0] * vb[2];

@ -513,7 +513,11 @@ static uint scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
sc->vert = eve; sc->vert = eve;
sc->edge_first = sc->edge_last = NULL; sc->edge_first = sc->edge_last = NULL;
/* NOTE: debug print only will work for curve poly-fill, union is in use for mesh. */ /* NOTE: debug print only will work for curve poly-fill, union is in use for mesh. */
/* if (even->tmp.v == NULL) eve->tmp.u = verts; */ #if 0
if (even->tmp.v == NULL) {
eve->tmp.u = verts;
}
#endif
sc++; sc++;
} }
} }
@ -613,9 +617,13 @@ static uint scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
ed1 = sc->edge_first; ed1 = sc->edge_first;
ed2 = ed1->next; ed2 = ed1->next;
/* commented out... the ESC here delivers corrupted memory /* Commented out: the ESC here delivers corrupted memory
* (and doesn't work during grab). */ * (and doesn't work during grab). */
/* if (callLocalInterruptCallBack()) break; */ #if 0
if (callLocalInterruptCallBack()){
break;
}
#endif
if (totface >= maxface) { if (totface >= maxface) {
// printf("Fill error: endless loop. Escaped at vert %d, tot: %d.\n", a, verts); // printf("Fill error: endless loop. Escaped at vert %d, tot: %d.\n", a, verts);
a = verts; a = verts;
@ -1094,8 +1102,11 @@ uint BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float n
*pc = c; *pc = c;
pc++; pc++;
} }
/* only for optimize! */ #if 0
/* else if (pf->max_xy[0] < (pflist+c)->min[cox]) break; */ else if (pf->max_xy[0] < (pflist + c)->min[cox]) { /* Only for optimize! */
break;
}
#endif
} }
while (pc != polycache) { while (pc != polycache) {
pc--; pc--;

@ -2270,7 +2270,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main)
lib->filepath_abs); lib->filepath_abs);
change_link_placeholder_to_real_ID_pointer(fd->mainlist, fd, lib, newmain->curlib); change_link_placeholder_to_real_ID_pointer(fd->mainlist, fd, lib, newmain->curlib);
/* change_link_placeholder_to_real_ID_pointer_fd(fd, lib, newmain->curlib); */ // change_link_placeholder_to_real_ID_pointer_fd(fd, lib, newmain->curlib);
BLI_remlink(&main->libraries, lib); BLI_remlink(&main->libraries, lib);
MEM_freeN(lib); MEM_freeN(lib);

@ -1853,7 +1853,7 @@ BMVert *bmesh_kernel_join_vert_kill_edge(BMesh *bm,
BM_CHECK_ELEMENT(v_target); BM_CHECK_ELEMENT(v_target);
if (v_target->e && v_kill->e) { if (v_target->e && v_kill->e) {
/* inline BM_vert_splice(bm, v_target, v_kill); */ /* Inline `BM_vert_splice(bm, v_target, v_kill)`. */
BMEdge *e; BMEdge *e;
while ((e = v_kill->e)) { while ((e = v_kill->e)) {
BMEdge *e_target; BMEdge *e_target;

@ -251,7 +251,7 @@ static bool bm_loop_path_build_step(BLI_mempool *vs_pool,
} }
/* Commented because used in a loop, and this flag has already been set. */ /* Commented because used in a loop, and this flag has already been set. */
/* bm->elem_index_dirty |= BM_VERT; */ // bm->elem_index_dirty |= BM_VERT;
/* lb is now full of free'd items, overwrite */ /* lb is now full of free'd items, overwrite */
*lb = lb_tmp; *lb = lb_tmp;

@ -37,7 +37,7 @@ ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) BLI_INLINE void *BM_iter_step(BMIter *it
ATTR_NONNULL(1) ATTR_NONNULL(1)
BLI_INLINE bool BM_iter_init(BMIter *iter, BMesh *bm, const char itype, void *data) BLI_INLINE bool BM_iter_init(BMIter *iter, BMesh *bm, const char itype, void *data)
{ {
/* int argtype; */ // int argtype;
iter->itype = itype; iter->itype = itype;
/* inlining optimizes out this switch when called with the defined type */ /* inlining optimizes out this switch when called with the defined type */

@ -395,7 +395,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm,
e_new = bmesh_kernel_join_edge_kill_vert( e_new = bmesh_kernel_join_edge_kill_vert(
bm, e_kill, v_kill, do_del, true, kill_degenerate_faces, kill_duplicate_faces); bm, e_kill, v_kill, do_del, true, kill_degenerate_faces, kill_duplicate_faces);
/* e_new = BM_edge_exists(tv, tv2); */ /* same as return above */ // e_new = BM_edge_exists(tv, tv2); /* Same as return above. */
} }
return e_new; return e_new;

@ -264,7 +264,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op) void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
{ {
/* BMOperator fop; */ // BMOperator fop;
BMFace *act_face = bm->act_face; BMFace *act_face = bm->act_face;
BMOIter eiter; BMOIter eiter;
BMIter iter; BMIter iter;

@ -38,7 +38,7 @@ void bmo_mesh_to_bmesh_exec(BMesh *bm, BMOperator *op)
void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op) void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op)
{ {
Object *ob = static_cast<Object *>(BMO_slot_ptr_get(op->slots_in, "object")); Object *ob = static_cast<Object *>(BMO_slot_ptr_get(op->slots_in, "object"));
/* Scene *scene = BMO_slot_ptr_get(op, "scene"); */ // Scene *scene = BMO_slot_ptr_get(op, "scene");
Mesh *me = static_cast<Mesh *>(ob->data); Mesh *me = static_cast<Mesh *>(ob->data);
BMO_op_callf(bm, op->flag, "bmesh_to_mesh mesh=%p object=%p", me, ob); BMO_op_callf(bm, op->flag, "bmesh_to_mesh mesh=%p object=%p", me, ob);
@ -47,7 +47,7 @@ void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op)
void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op) void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op)
{ {
Mesh *me = static_cast<Mesh *>(BMO_slot_ptr_get(op->slots_in, "mesh")); Mesh *me = static_cast<Mesh *>(BMO_slot_ptr_get(op->slots_in, "mesh"));
/* Object *ob = BMO_slot_ptr_get(op, "object"); */ // Object *ob = BMO_slot_ptr_get(op, "object");
BMeshToMeshParams params{}; BMeshToMeshParams params{};
params.calc_object_remap = true; params.calc_object_remap = true;

@ -36,8 +36,8 @@ struct SubDParams {
bool use_fractal; bool use_fractal;
int seed; int seed;
BMOperator *op; BMOperator *op;
BMOpSlot *slot_edge_percents; /* BMO_slot_get(params->op->slots_in, "edge_percents"); */ BMOpSlot *slot_edge_percents; /* `BMO_slot_get(params->op->slots_in, "edge_percents")`. */
BMOpSlot *slot_custom_patterns; /* BMO_slot_get(params->op->slots_in, "custom_patterns"); */ BMOpSlot *slot_custom_patterns; /* `BMO_slot_get(params->op->slots_in, "custom_patterns")`. */
float fractal_ofs[3]; float fractal_ofs[3];
/* Runtime storage for shape key. */ /* Runtime storage for shape key. */
@ -601,9 +601,9 @@ static void quad_2edge_split_fan(BMesh *bm,
const SubDParams *params) const SubDParams *params)
{ {
BMFace *f_new; BMFace *f_new;
/* BMVert *v; */ /* UNUSED */ // BMVert *v; /* UNUSED */
/* BMVert *v_last = verts[2]; */ /* UNUSED */ // BMVert *v_last = verts[2]; /* UNUSED */
/* BMEdge *e, *e_new; */ /* UNUSED */ // BMEdge *e, *e_new; /* UNUSED */
int i, numcuts = params->numcuts; int i, numcuts = params->numcuts;
for (i = 0; i < numcuts; i++) { for (i = 0; i < numcuts; i++) {

@ -54,7 +54,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
BMOIter siter; BMOIter siter;
BMEdge *e; BMEdge *e;
ScanFillContext sf_ctx; ScanFillContext sf_ctx;
/* ScanFillEdge *sf_edge; */ /* UNUSED */ // ScanFillEdge *sf_edge; /* UNUSED */
GHash *sf_vert_map; GHash *sf_vert_map;
float normal[3]; float normal[3];
const int scanfill_flag = BLI_SCANFILL_CALC_HOLES | BLI_SCANFILL_CALC_POLYS | const int scanfill_flag = BLI_SCANFILL_CALC_HOLES | BLI_SCANFILL_CALC_POLYS |
@ -88,7 +88,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
} }
/* sf_edge = */ BLI_scanfill_edge_add(&sf_ctx, UNPACK2(sf_verts)); /* sf_edge = */ BLI_scanfill_edge_add(&sf_ctx, UNPACK2(sf_verts));
/* sf_edge->tmp.p = e; */ /* UNUSED */ // sf_edge->tmp.p = e; /* UNUSED */
} }
nors_tot = BLI_ghash_len(sf_vert_map); nors_tot = BLI_ghash_len(sf_vert_map);
BLI_ghash_free(sf_vert_map, nullptr, nullptr); BLI_ghash_free(sf_vert_map, nullptr, nullptr);

@ -5731,7 +5731,7 @@ static void bevel_build_cutoff(BevelParams *bp, BMesh *bm, BevVert *bv)
} }
/* Create the profile cutoff face for this boundvert. */ /* Create the profile cutoff face for this boundvert. */
/* repface = boundvert_rep_face(bndv, nullptr); */ // repface = boundvert_rep_face(bndv, nullptr);
bev_create_ngon(bm, bev_create_ngon(bm,
face_bmverts, face_bmverts,
bp->seg + 2 + build_center_face, bp->seg + 2 + build_center_face,

@ -16,12 +16,12 @@ class ChannelMatteOperation : public MultiThreadedOperation {
private: private:
SocketReader *input_image_program_; SocketReader *input_image_program_;
/* int color_space_; */ /* node->custom1 */ /* UNUSED */ /* TODO ? */ // int color_space_; /* node->custom1 */ /* UNUSED */ /* TODO? */
int matte_channel_; /* node->custom2 */ int matte_channel_; /* node->custom2 */
int limit_method_; /* node->algorithm */ int limit_method_; /* node->algorithm */
int limit_channel_; /* node->channel */ int limit_channel_; /* node->channel */
float limit_max_; /* node->storage->t1 */ float limit_max_; /* node->storage->t1 */
float limit_min_; /* node->storage->t2 */ float limit_min_; /* node->storage->t2 */
float limit_range_; float limit_range_;

@ -91,7 +91,7 @@ void MovieDistortionOperation::execute_pixel_sampled(float output[4],
return; return;
} }
/* float overscan = 0.0f; */ // float overscan = 0.0f;
const float w = float(width) /* / (1 + overscan) */; const float w = float(width) /* / (1 + overscan) */;
const float h = float(height) /* / (1 + overscan) */; const float h = float(height) /* / (1 + overscan) */;
const float pixel_aspect = pixel_aspect_; const float pixel_aspect = pixel_aspect_;

@ -787,7 +787,7 @@ wmJob *EEVEE_lightbake_job_create(wmWindowManager *wm,
MEM_callocN(sizeof(EEVEE_LightBake), "EEVEE_LightBake")); MEM_callocN(sizeof(EEVEE_LightBake), "EEVEE_LightBake"));
/* Cannot reuse depsgraph for now because we cannot get the update from the /* Cannot reuse depsgraph for now because we cannot get the update from the
* main database directly. TODO: reuse depsgraph and only update positions. */ * main database directly. TODO: reuse depsgraph and only update positions. */
/* lbake->depsgraph = old_lbake->depsgraph; */ // lbake->depsgraph = old_lbake->depsgraph;
lbake->depsgraph = DEG_graph_new(bmain, scene, view_layer, DAG_EVAL_RENDER); lbake->depsgraph = DEG_graph_new(bmain, scene, view_layer, DAG_EVAL_RENDER);
lbake->mutex = BLI_mutex_alloc(); lbake->mutex = BLI_mutex_alloc();

@ -1160,7 +1160,7 @@ float ShadowModule::tilemap_pixel_radius()
/* Update all shadow regions visible inside the view. /* Update all shadow regions visible inside the view.
* If called multiple time for the same view, it will only do the depth buffer scanning * If called multiple time for the same view, it will only do the depth buffer scanning
* to check any new opaque surfaces. * to check any new opaque surfaces.
* Needs to be called after LightModule::set_view(); */ * Needs to be called after `LightModule::set_view();`. */
void ShadowModule::set_view(View &view) void ShadowModule::set_view(View &view)
{ {
GPUFrameBuffer *prev_fb = GPU_framebuffer_active_get(); GPUFrameBuffer *prev_fb = GPU_framebuffer_active_get();

@ -116,7 +116,7 @@ vec3 camera_view_from_uv(CameraData cam, vec2 uv)
vV = camera_equirectangular_to_direction(cam, uv); vV = camera_equirectangular_to_direction(cam, uv);
break; break;
case CAMERA_PANO_EQUIDISTANT: case CAMERA_PANO_EQUIDISTANT:
/* ATTR_FALLTHROUGH; */ // ATTR_FALLTHROUGH;
case CAMERA_PANO_EQUISOLID: case CAMERA_PANO_EQUISOLID:
vV = camera_fisheye_to_direction(cam, uv); vV = camera_fisheye_to_direction(cam, uv);
break; break;
@ -138,7 +138,7 @@ vec2 camera_uv_from_view(CameraData cam, vec3 vV)
case CAMERA_PANO_EQUIRECT: case CAMERA_PANO_EQUIRECT:
return camera_equirectangular_from_direction(cam, vV); return camera_equirectangular_from_direction(cam, vV);
case CAMERA_PANO_EQUISOLID: case CAMERA_PANO_EQUISOLID:
/* ATTR_FALLTHROUGH; */ // ATTR_FALLTHROUGH;
case CAMERA_PANO_EQUIDISTANT: case CAMERA_PANO_EQUIDISTANT:
return camera_fisheye_from_direction(cam, vV); return camera_fisheye_from_direction(cam, vV);
case CAMERA_PANO_MIRROR: case CAMERA_PANO_MIRROR:

@ -23,8 +23,8 @@ vec2 shadow_page_uv_transform(
/* Rotate vector to light's local space . Used for directional shadows. */ /* Rotate vector to light's local space . Used for directional shadows. */
vec3 shadow_world_to_local(LightData ld, vec3 L) vec3 shadow_world_to_local(LightData ld, vec3 L)
{ {
/* Avoid relying on compiler to optimize this. /* Avoid relying on compiler to optimize this. */
* vec3 lL = transpose(mat3(ld.object_mat)) * L; */ // vec3 lL = transpose(mat3(ld.object_mat)) * L;
vec3 lL; vec3 lL;
lL.x = dot(ld.object_mat[0].xyz, L); lL.x = dot(ld.object_mat[0].xyz, L);
lL.y = dot(ld.object_mat[1].xyz, L); lL.y = dot(ld.object_mat[1].xyz, L);

@ -61,7 +61,7 @@ enum eArmatureDrawMode {
struct ArmatureDrawContext { struct ArmatureDrawContext {
/* Current armature object */ /* Current armature object */
Object *ob; Object *ob;
/* bArmature *arm; */ /* TODO */ // bArmature *arm; /* TODO. */
eArmatureDrawMode draw_mode; eArmatureDrawMode draw_mode;
eArmature_Drawtype drawtype; eArmature_Drawtype drawtype;

@ -5089,7 +5089,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
/* callback for NLA Control Curve widget sliders - insert keyframes */ /* callback for NLA Control Curve widget sliders - insert keyframes */
static void achannel_setting_slider_nla_curve_cb(bContext *C, void * /*id_poin*/, void *fcu_poin) static void achannel_setting_slider_nla_curve_cb(bContext *C, void * /*id_poin*/, void *fcu_poin)
{ {
/* ID *id = (ID *)id_poin; */ // ID *id = (ID *)id_poin;
FCurve *fcu = (FCurve *)fcu_poin; FCurve *fcu = (FCurve *)fcu_poin;
PointerRNA ptr; PointerRNA ptr;

@ -4667,7 +4667,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
MEM_freeN(nu1->bp); MEM_freeN(nu1->bp);
nu1->bp = bp; nu1->bp = bp;
/* a = nu1->pntsu + nu1->orderu; */ /* UNUSED */ // a = nu1->pntsu + nu1->orderu; /* UNUSED */
nu1->pntsu += nu2->pntsu; nu1->pntsu += nu2->pntsu;
BLI_remlink(nubase, nu2); BLI_remlink(nubase, nu2);

@ -478,7 +478,6 @@ static void font_select_update_primary_clipboard(Object *obedit)
/** \name Generic Paste Functions /** \name Generic Paste Functions
* \{ */ * \{ */
/* text_update_edited(C, scene, obedit, 1, FO_EDIT); */
static bool font_paste_wchar(Object *obedit, static bool font_paste_wchar(Object *obedit,
const char32_t *str, const char32_t *str,
const size_t str_len, const size_t str_len,

@ -1294,8 +1294,8 @@ static bool annotation_session_initdata(bContext *C, tGPsdata *p)
switch (curarea->spacetype) { switch (curarea->spacetype) {
/* supported views first */ /* supported views first */
case SPACE_VIEW3D: { case SPACE_VIEW3D: {
/* View3D *v3d = curarea->spacedata.first; */ // View3D *v3d = curarea->spacedata.first;
/* RegionView3D *rv3d = region->regiondata; */ // RegionView3D *rv3d = region->regiondata;
/* set current area /* set current area
* - must verify that region data is 3D-view (and not something else) * - must verify that region data is 3D-view (and not something else)
@ -1312,7 +1312,7 @@ static bool annotation_session_initdata(bContext *C, tGPsdata *p)
break; break;
} }
case SPACE_NODE: { case SPACE_NODE: {
/* SpaceNode *snode = curarea->spacedata.first; */ // SpaceNode *snode = curarea->spacedata.first;
/* set current area */ /* set current area */
p->area = curarea; p->area = curarea;
@ -1338,7 +1338,7 @@ static bool annotation_session_initdata(bContext *C, tGPsdata *p)
break; break;
} }
case SPACE_IMAGE: { case SPACE_IMAGE: {
/* SpaceImage *sima = curarea->spacedata.first; */ // SpaceImage *sima = curarea->spacedata.first;
/* set the current area */ /* set the current area */
p->area = curarea; p->area = curarea;

@ -4987,8 +4987,8 @@ static float ui_numedit_apply_snapf(
if (fac != 1.0f) { if (fac != 1.0f) {
/* snap in unit-space */ /* snap in unit-space */
tempf /= fac; tempf /= fac;
/* softmin /= fac; */ /* UNUSED */ // softmin /= fac; /* UNUSED */
/* softmax /= fac; */ /* UNUSED */ // softmax /= fac; /* UNUSED */
softrange /= fac; softrange /= fac;
} }

@ -614,7 +614,7 @@ static void ui_item_array(uiLayout *layout,
} }
w /= dim_size[0]; w /= dim_size[0];
/* h /= dim_size[1]; */ /* UNUSED */ // h /= dim_size[1]; /* UNUSED */
for (int a = 0; a < len; a++) { for (int a = 0; a < len; a++) {
col = a % dim_size[0]; col = a % dim_size[0];
@ -3750,7 +3750,7 @@ static void ui_litem_layout_row(uiLayout *litem)
int freew, fixedx, freex, flag = 0, lastw = 0; int freew, fixedx, freex, flag = 0, lastw = 0;
float extra_pixel; float extra_pixel;
/* x = litem->x; */ /* UNUSED */ // x = litem->x; /* UNUSED */
const int y = litem->y; const int y = litem->y;
int w = litem->w; int w = litem->w;
int totw = 0; int totw = 0;

@ -100,7 +100,7 @@ uiPieMenu *UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmE
pie->block_radial = UI_block_begin(C, nullptr, __func__, UI_EMBOSS); pie->block_radial = UI_block_begin(C, nullptr, __func__, UI_EMBOSS);
/* may be useful later to allow spawning pies /* may be useful later to allow spawning pies
* from old positions */ * from old positions */
/* pie->block_radial->flag |= UI_BLOCK_POPUP_MEMORY; */ // pie->block_radial->flag |= UI_BLOCK_POPUP_MEMORY;
pie->block_radial->puphash = ui_popup_menu_hash(title); pie->block_radial->puphash = ui_popup_menu_hash(title);
pie->block_radial->flag |= UI_BLOCK_RADIAL; pie->block_radial->flag |= UI_BLOCK_RADIAL;

@ -538,7 +538,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize)
} }
} }
do_cur = do_x; do_cur = do_x;
/* do_win = do_y; */ /* UNUSED */ // do_win = do_y; /* UNUSED. */
if (do_cur) { if (do_cur) {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {

@ -665,10 +665,10 @@ void ED_mask_draw_region(
const float width = width_i, height = float(height_i) * (aspy / aspx); const float width = width_i, height = float(height_i) * (aspy / aspx);
int x, y; int x, y;
/* int w, h; */ // int w, h;
float zoomx, zoomy; float zoomx, zoomy;
/* frame image */ /* Frame image. */
float maxdim; float maxdim;
float xofs, yofs; float xofs, yofs;

@ -3849,7 +3849,7 @@ static void knife_constrain_axis(KnifeTool_OpData *kcd)
mul_m3_m3_pre(co, mat); mul_m3_m3_pre(co, mat);
for (int i = 0; i <= 2; i++) { for (int i = 0; i <= 2; i++) {
if ((kcd->constrain_axis - 1) != i) { if ((kcd->constrain_axis - 1) != i) {
/* kcd->curr_cage_adjusted[i] = prev_cage_adjusted[i]; */ // kcd->curr_cage_adjusted[i] = prev_cage_adjusted[i];
co[2][i] = co[0][i]; co[2][i] = co[0][i];
} }
} }

@ -373,7 +373,7 @@ float ED_object_new_primitive_matrix(bContext *C,
return dia; return dia;
} }
/* return 1.0f; */ // return 1.0f;
} }
/** \} */ /** \} */

@ -2468,7 +2468,7 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
ot->description = "Save displacements to an external file"; ot->description = "Save displacements to an external file";
ot->idname = "OBJECT_OT_multires_external_save"; ot->idname = "OBJECT_OT_multires_external_save";
/* XXX modifier no longer in context after file browser .. ot->poll = multires_poll; */ /* XXX modifier no longer in context after file browser: `ot->poll = multires_poll;`. */
ot->exec = multires_external_save_exec; ot->exec = multires_external_save_exec;
ot->invoke = multires_external_save_invoke; ot->invoke = multires_external_save_invoke;
ot->poll = multires_poll; ot->poll = multires_poll;

@ -627,8 +627,8 @@ bool ED_object_parent_set(ReportList *reports,
* NOTE: the old (2.4x) method was to set ob->partype = PARSKEL, * creating the * NOTE: the old (2.4x) method was to set ob->partype = PARSKEL, * creating the
* virtual modifiers. * virtual modifiers.
*/ */
ob->partype = PAROBJECT; /* NOTE: DNA define, not operator property. */ ob->partype = PAROBJECT; /* NOTE: DNA define, not operator property. */
/* ob->partype = PARSKEL; */ /* NOTE: DNA define, not operator property. */ // ob->partype = PARSKEL; /* NOTE: DNA define, not operator property. */
/* BUT, to keep the deforms, we need a modifier, * and then we need to set the object /* BUT, to keep the deforms, we need a modifier, * and then we need to set the object
* that it uses * that it uses

@ -1540,7 +1540,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_change++; tot_change++;
arm->id.tag |= LIB_TAG_DOIT; arm->id.tag |= LIB_TAG_DOIT;
/* do_inverse_offset = true; */ /* docenter_armature() handles this */ // do_inverse_offset = true; /* docenter_armature() handles this. */
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
BKE_object_transform_copy(ob_eval, ob); BKE_object_transform_copy(ob_eval, ob);

@ -988,12 +988,12 @@ static int line_isect_y(const float p1[2], const float p2[2], const float y_leve
} }
if (p1[1] > y_level && p2[1] < y_level) { if (p1[1] > y_level && p2[1] < y_level) {
/* (p1[1] - p2[1]); */ /* `p1[1] - p2[1]`. */
*x_isect = (p2[0] * (p1[1] - y_level) + p1[0] * (y_level - p2[1])) / y_diff; *x_isect = (p2[0] * (p1[1] - y_level) + p1[0] * (y_level - p2[1])) / y_diff;
return ISECT_TRUE; return ISECT_TRUE;
} }
if (p1[1] < y_level && p2[1] > y_level) { if (p1[1] < y_level && p2[1] > y_level) {
/* (p2[1] - p1[1]); */ /* `p2[1] - p1[1]`. */
*x_isect = (p2[0] * (y_level - p1[1]) + p1[0] * (p2[1] - y_level)) / y_diff; *x_isect = (p2[0] * (y_level - p1[1]) + p1[0] * (p2[1] - y_level)) / y_diff;
return ISECT_TRUE; return ISECT_TRUE;
} }
@ -1023,12 +1023,12 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve
} }
if (p1[0] > x_level && p2[0] < x_level) { if (p1[0] > x_level && p2[0] < x_level) {
/* (p1[0] - p2[0]); */ /* `p1[0] - p2[0]`. */
*y_isect = (p2[1] * (p1[0] - x_level) + p1[1] * (x_level - p2[0])) / x_diff; *y_isect = (p2[1] * (p1[0] - x_level) + p1[1] * (x_level - p2[0])) / x_diff;
return ISECT_TRUE; return ISECT_TRUE;
} }
if (p1[0] < x_level && p2[0] > x_level) { if (p1[0] < x_level && p2[0] > x_level) {
/* (p2[0] - p1[0]); */ /* `p2[0] - p1[0]`. */
*y_isect = (p2[1] * (x_level - p1[0]) + p1[1] * (p2[0] - x_level)) / x_diff; *y_isect = (p2[1] * (x_level - p1[0]) + p1[1] * (p2[0] - x_level)) / x_diff;
return ISECT_TRUE; return ISECT_TRUE;
} }
@ -3088,9 +3088,9 @@ static void project_paint_face_init(const ProjPaintState *ps,
lt_uv_pxoffset[2][1] = lt_tri_uv[2][1] - yhalfpx; lt_uv_pxoffset[2][1] = lt_tri_uv[2][1] - yhalfpx;
{ {
uv1co = lt_uv_pxoffset[0]; /* was lt_tri_uv[i1]; */ uv1co = lt_uv_pxoffset[0]; /* Was `lt_tri_uv[i1];`. */
uv2co = lt_uv_pxoffset[1]; /* was lt_tri_uv[i2]; */ uv2co = lt_uv_pxoffset[1]; /* Was `lt_tri_uv[i2];`. */
uv3co = lt_uv_pxoffset[2]; /* was lt_tri_uv[i3]; */ uv3co = lt_uv_pxoffset[2]; /* Was `lt_tri_uv[i3];`. */
v1coSS = ps->screenCoords[lt_vtri[0]]; v1coSS = ps->screenCoords[lt_vtri[0]];
v2coSS = ps->screenCoords[lt_vtri[1]]; v2coSS = ps->screenCoords[lt_vtri[1]];

@ -2049,7 +2049,7 @@ static int actkeys_clickselect_exec(bContext *C, wmOperator *op)
} }
/* get useful pointers from animation context data */ /* get useful pointers from animation context data */
/* region = ac.region; */ /* UNUSED */ // region = ac.region; /* UNUSED. */
/* select mode is either replace (deselect all, then add) or add/extend */ /* select mode is either replace (deselect all, then add) or add/extend */
const short selectmode = RNA_boolean_get(op->ptr, "extend") ? SELECT_INVERT : SELECT_REPLACE; const short selectmode = RNA_boolean_get(op->ptr, "extend") ? SELECT_INVERT : SELECT_REPLACE;

@ -322,7 +322,7 @@ static void image_view_all(SpaceImage *sima, ARegion *region, wmOperator *op)
bool space_image_main_region_poll(bContext *C) bool space_image_main_region_poll(bContext *C)
{ {
SpaceImage *sima = CTX_wm_space_image(C); SpaceImage *sima = CTX_wm_space_image(C);
/* XXX ARegion *region = CTX_wm_region(C); */ // ARegion *region = CTX_wm_region(C); /* XXX. */
if (sima) { if (sima) {
return true; /* XXX (region && region->type->regionid == RGN_TYPE_WINDOW); */ return true; /* XXX (region && region->type->regionid == RGN_TYPE_WINDOW); */

@ -448,7 +448,7 @@ static int /*eContextResult*/ image_context(const bContext *C,
if (CTX_data_dir(member)) { if (CTX_data_dir(member)) {
CTX_data_dir_set(result, image_context_dir); CTX_data_dir_set(result, image_context_dir);
/* TODO(sybren): return CTX_RESULT_OK; */ // return CTX_RESULT_OK; /* TODO(@sybren). */
} }
else if (CTX_data_equals(member, "edit_image")) { else if (CTX_data_equals(member, "edit_image")) {
CTX_data_id_pointer_set(result, (ID *)ED_space_image(sima)); CTX_data_id_pointer_set(result, (ID *)ED_space_image(sima));

@ -265,7 +265,7 @@ static void nla_panel_animdata(const bContext *C, Panel *panel)
{ {
PointerRNA adt_ptr; PointerRNA adt_ptr;
PointerRNA strip_ptr; PointerRNA strip_ptr;
/* AnimData *adt; */ // AnimData *adt;
uiLayout *layout = panel->layout; uiLayout *layout = panel->layout;
uiLayout *row; uiLayout *row;
uiBlock *block; uiBlock *block;
@ -279,7 +279,7 @@ static void nla_panel_animdata(const bContext *C, Panel *panel)
return; return;
} }
/* adt = adt_ptr.data; */ // adt = adt_ptr.data;
block = uiLayoutGetBlock(layout); block = uiLayoutGetBlock(layout);
UI_block_func_handle_set(block, do_nla_region_buttons, nullptr); UI_block_func_handle_set(block, do_nla_region_buttons, nullptr);

@ -42,10 +42,10 @@ void TreeElementPoseBase::expand(SpaceOutliner & /*space_outliner*/) const
pchan->temp = (void *)ten; pchan->temp = (void *)ten;
if (!BLI_listbase_is_empty(&pchan->constraints)) { if (!BLI_listbase_is_empty(&pchan->constraints)) {
/* Object *target; */ // Object *target;
TreeElement *tenla1 = add_element( TreeElement *tenla1 = add_element(
&ten->subtree, &object_.id, nullptr, ten, TSE_CONSTRAINT_BASE, 0); &ten->subtree, &object_.id, nullptr, ten, TSE_CONSTRAINT_BASE, 0);
/* char *str; */ // char *str;
LISTBASE_FOREACH (bConstraint *, con, &pchan->constraints) { LISTBASE_FOREACH (bConstraint *, con, &pchan->constraints) {
add_element(&tenla1->subtree, &object_.id, con, tenla1, TSE_CONSTRAINT, const_index); add_element(&tenla1->subtree, &object_.id, con, tenla1, TSE_CONSTRAINT, const_index);

@ -82,7 +82,7 @@ struct TransSeq {
int start, machine; int start, machine;
int startofs, endofs; int startofs, endofs;
int anim_startofs, anim_endofs; int anim_startofs, anim_endofs;
/* int final_left, final_right; */ /* UNUSED */ // int final_left, final_right; /* UNUSED. */
int len; int len;
float content_start; float content_start;
}; };

@ -139,7 +139,7 @@ bool sequencer_edit_poll(bContext *C);
bool sequencer_edit_with_channel_region_poll(bContext *C); bool sequencer_edit_with_channel_region_poll(bContext *C);
bool sequencer_editing_initialized_and_active(bContext *C); bool sequencer_editing_initialized_and_active(bContext *C);
/* UNUSED */ /* UNUSED */
/* bool sequencer_strip_poll( bContext *C); */ // bool sequencer_strip_poll( bContext *C);
bool sequencer_strip_has_path_poll(bContext *C); bool sequencer_strip_has_path_poll(bContext *C);
bool sequencer_view_has_preview_poll(bContext *C); bool sequencer_view_has_preview_poll(bContext *C);
bool sequencer_view_preview_only_poll(const bContext *C); bool sequencer_view_preview_only_poll(const bContext *C);

@ -202,7 +202,11 @@ static void sequencer_free(SpaceLink *sl)
SpaceSeq *sseq = (SpaceSeq *)sl; SpaceSeq *sseq = (SpaceSeq *)sl;
SequencerScopes *scopes = &sseq->scopes; SequencerScopes *scopes = &sseq->scopes;
/* XXX if (sseq->gpd) BKE_gpencil_free_data(sseq->gpd); */ #if 0
if (sseq->gpd) {
BKE_gpencil_free_data(sseq->gpd);
}
#endif
if (scopes->zebra_ibuf) { if (scopes->zebra_ibuf) {
IMB_freeImBuf(scopes->zebra_ibuf); IMB_freeImBuf(scopes->zebra_ibuf);
@ -298,7 +302,7 @@ static SpaceLink *sequencer_duplicate(SpaceLink *sl)
SpaceSeq *sseqn = static_cast<SpaceSeq *>(MEM_dupallocN(sl)); SpaceSeq *sseqn = static_cast<SpaceSeq *>(MEM_dupallocN(sl));
/* Clear or remove stuff from old. */ /* Clear or remove stuff from old. */
/* XXX sseq->gpd = gpencil_data_duplicate(sseq->gpd, false); */ // sseq->gpd = gpencil_data_duplicate(sseq->gpd, false);
memset(&sseqn->scopes, 0, sizeof(sseqn->scopes)); memset(&sseqn->scopes, 0, sizeof(sseqn->scopes));
memset(&sseqn->runtime, 0, sizeof(sseqn->runtime)); memset(&sseqn->runtime, 0, sizeof(sseqn->runtime));

@ -54,7 +54,7 @@ bool text_do_suggest_select(SpaceText *st, ARegion *region, const int mval[2])
first = texttool_suggest_first(); first = texttool_suggest_first();
last = texttool_suggest_last(); last = texttool_suggest_last();
/* sel = texttool_suggest_selected(); */ /* UNUSED */ // sel = texttool_suggest_selected(); /* UNUSED. */
top = texttool_suggest_top(); top = texttool_suggest_top();
if (!last || !first) { if (!last || !first) {

@ -1220,7 +1220,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
} }
} }
/* ED_undo_push(C, "Transform properties"); */ // ED_undo_push(C, "Transform properties");
} }
} }

@ -219,7 +219,7 @@ void ED_view3d_smooth_view_ex(
} }
sms.org_view = rv3d->view; sms.org_view = rv3d->view;
/* sms.to_camera = false; */ /* initialized to zero anyway */ // sms.to_camera = false; /* Initialized to zero anyway. */
/* note on camera locking, this is a little confusing but works ok. /* note on camera locking, this is a little confusing but works ok.
* we may be changing the view 'as if' there is no active camera, but in fact * we may be changing the view 'as if' there is no active camera, but in fact

@ -40,7 +40,7 @@ void ED_view3d_project_float_v2_m4(const ARegion *region,
copy_v3_v3(vec4, co); copy_v3_v3(vec4, co);
vec4[3] = 1.0; vec4[3] = 1.0;
/* r_co[0] = IS_CLIPPED; */ /* always overwritten */ // r_co[0] = IS_CLIPPED; /* Always overwritten. */
mul_m4_v4(mat, vec4); mul_m4_v4(mat, vec4);
@ -62,7 +62,7 @@ void ED_view3d_project_float_v3_m4(const ARegion *region,
copy_v3_v3(vec4, co); copy_v3_v3(vec4, co);
vec4[3] = 1.0; vec4[3] = 1.0;
/* r_co[0] = IS_CLIPPED; */ /* always overwritten */ // r_co[0] = IS_CLIPPED; /* Always overwritten. */
mul_m4_v4(mat, vec4); mul_m4_v4(mat, vec4);

@ -4600,7 +4600,7 @@ static bool paint_vertsel_circle_select(ViewContext *vc,
const bool use_zbuf = !XRAY_ENABLED(vc->v3d); const bool use_zbuf = !XRAY_ENABLED(vc->v3d);
Object *ob = vc->obact; Object *ob = vc->obact;
Mesh *me = static_cast<Mesh *>(ob->data); Mesh *me = static_cast<Mesh *>(ob->data);
/* CircleSelectUserData data = {nullptr}; */ /* UNUSED */ // CircleSelectUserData data = {nullptr}; /* UNUSED. */
bool changed = false; bool changed = false;
if (SEL_OP_USE_PRE_DESELECT(sel_op)) { if (SEL_OP_USE_PRE_DESELECT(sel_op)) {

@ -114,8 +114,8 @@ void constraintNumInput(TransInfo *t, float vec[3])
if (dims == 2) { if (dims == 2) {
int axis = mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2); int axis = mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2);
if (axis == (CON_AXIS0 | CON_AXIS1)) { if (axis == (CON_AXIS0 | CON_AXIS1)) {
/* vec[0] = vec[0]; */ /* same */ // vec[0] = vec[0]; /* Same. */
/* vec[1] = vec[1]; */ /* same */ // vec[1] = vec[1]; /* Same. */
vec[2] = nval; vec[2] = nval;
} }
else if (axis == (CON_AXIS1 | CON_AXIS2)) { else if (axis == (CON_AXIS1 | CON_AXIS2)) {
@ -124,14 +124,14 @@ void constraintNumInput(TransInfo *t, float vec[3])
vec[0] = nval; vec[0] = nval;
} }
else if (axis == (CON_AXIS0 | CON_AXIS2)) { else if (axis == (CON_AXIS0 | CON_AXIS2)) {
/* vec[0] = vec[0]; */ /* same */ // vec[0] = vec[0]; /* Same. */
vec[2] = vec[1]; vec[2] = vec[1];
vec[1] = nval; vec[1] = nval;
} }
} }
else if (dims == 1) { else if (dims == 1) {
if (mode & CON_AXIS0) { if (mode & CON_AXIS0) {
/* vec[0] = vec[0]; */ /* same */ // vec[0] = vec[0]; /* Same. */
vec[1] = nval; vec[1] = nval;
vec[2] = nval; vec[2] = nval;
} }

@ -1630,9 +1630,9 @@ static short apply_targetless_ik(Object *ob)
mat3_to_size(parchan->size, smat); mat3_to_size(parchan->size, smat);
} }
/* causes problems with some constraints (e.g. childof), so disable this */ /* Causes problems with some constraints (e.g. child-of), so disable this
/* as it is IK shouldn't affect location directly */ * as it is IK shouldn't affect location directly. */
/* copy_v3_v3(parchan->loc, mat[3]); */ // copy_v3_v3(parchan->loc, mat[3]);
} }
} }

@ -685,7 +685,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo
} }
} }
/* !BM_edge_is_boundary(e); */ /* Equivalent to `!BM_edge_is_boundary(e)`. */
if (l_b != l_a) { if (l_b != l_a) {
BMEdge *e_next = get_other_edge(v, e); BMEdge *e_next = get_other_edge(v, e);
if (e_next) { if (e_next) {

@ -133,7 +133,7 @@ static void applyTimeSlide(TransInfo *t)
/* t->values_final[0] stores cval[0], which is the current mouse-pointer location (in frames) */ /* t->values_final[0] stores cval[0], which is the current mouse-pointer location (in frames) */
/* XXX Need to be able to repeat this. */ /* XXX Need to be able to repeat this. */
/* t->values_final[0] = cval[0]; */ /* UNUSED (reset again later). */ // t->values_final[0] = cval[0]; /* UNUSED (reset again later). */
/* handle numeric-input stuff */ /* handle numeric-input stuff */
t->vec[0] = 2.0f * (cval[0] - sval[0]) / (maxx - minx); t->vec[0] = 2.0f * (cval[0] - sval[0]) / (maxx - minx);

@ -1520,7 +1520,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select);
BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select);
} }
/* BM_face_select_set(em->bm, efa, true); */ // BM_face_select_set(em->bm, efa, true);
BM_elem_flag_enable(efa, BM_ELEM_TAG); BM_elem_flag_enable(efa, BM_ELEM_TAG);
} }
} }
@ -1546,7 +1546,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select);
} }
} }
/* BM_face_select_set(em->bm, efa, true); */ // BM_face_select_set(em->bm, efa, true);
BM_elem_flag_enable(efa, BM_ELEM_TAG); BM_elem_flag_enable(efa, BM_ELEM_TAG);
} }
} }
@ -1560,7 +1560,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select);
BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select);
} }
/* BM_face_select_set(em->bm, efa, true); */ // BM_face_select_set(em->bm, efa, true);
BM_elem_flag_enable(efa, BM_ELEM_TAG); BM_elem_flag_enable(efa, BM_ELEM_TAG);
} }
} }
@ -1573,7 +1573,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, select);
BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select); BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, select);
} }
/* BM_face_select_set(em->bm, efa, true); */ // BM_face_select_set(em->bm, efa, true);
BM_elem_flag_enable(efa, BM_ELEM_TAG); BM_elem_flag_enable(efa, BM_ELEM_TAG);
} }
} }

@ -3273,7 +3273,7 @@ static void uv_select_flush_from_tag_sticky_loc_internal(const Scene *scene,
if (efa_index != vlist_iter->face_index) { if (efa_index != vlist_iter->face_index) {
BMLoop *l_other; BMLoop *l_other;
efa_vlist = BM_face_at_index(em->bm, vlist_iter->face_index); efa_vlist = BM_face_at_index(em->bm, vlist_iter->face_index);
/* tf_vlist = BM_ELEM_CD_GET_VOID_P(efa_vlist, cd_poly_tex_offset); */ /* UNUSED */ // tf_vlist = BM_ELEM_CD_GET_VOID_P(efa_vlist, cd_poly_tex_offset); /* UNUSED */
l_other = static_cast<BMLoop *>( l_other = static_cast<BMLoop *>(
BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->loop_of_face_index)); BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->loop_of_face_index));

@ -78,14 +78,14 @@ void NodeGroup::DetachChildren()
void NodeGroup::DetachChild(Node *iChild) void NodeGroup::DetachChild(Node *iChild)
{ {
/* int found = 0; */ /* UNUSED */ // int found = 0; /* UNUSED. */
vector<Node *>::iterator node; vector<Node *>::iterator node;
for (node = _Children.begin(); node != _Children.end(); ++node) { for (node = _Children.begin(); node != _Children.end(); ++node) {
if ((*node) == iChild) { if ((*node) == iChild) {
(*node)->release(); (*node)->release();
_Children.erase(node); _Children.erase(node);
/* found = 1; */ /* UNUSED */ // found = 1; /* UNUSED. */
break; break;
} }
} }

@ -71,7 +71,7 @@ template<class T> class UnaryFunction0D {
py_uf0D = nullptr; py_uf0D = nullptr;
} }
/** Destructor; */ /** Destructor. */
virtual ~UnaryFunction0D() {} virtual ~UnaryFunction0D() {}
/** Returns the string "UnaryFunction0D" */ /** Returns the string "UnaryFunction0D" */

@ -52,7 +52,8 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape,
// Reinit structures // Reinit structures
Init(oVShape); Init(oVShape);
/* ViewEdge *vedge; */ /* UNUSED */ // ViewEdge *vedge; /* UNUSED. */
// Let us build the smooth stuff // Let us build the smooth stuff
//---------------------------------------- //----------------------------------------
// We parse all faces to find the ones that contain smooth edges // We parse all faces to find the ones that contain smooth edges
@ -222,7 +223,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
// Find first edge: // Find first edge:
OWXEdge firstWEdge = iWEdge; OWXEdge firstWEdge = iWEdge;
/* OWXEdge previousWEdge = firstWEdge; */ /* UNUSED */ // OWXEdge previousWEdge = firstWEdge; /* UNUSED */
OWXEdge currentWEdge = firstWEdge; OWXEdge currentWEdge = firstWEdge;
list<OWXEdge> edgesChain; list<OWXEdge> edgesChain;
#if 0 /* TK 02-Sep-2012 Experimental fix for incorrect view edge visibility. */ #if 0 /* TK 02-Sep-2012 Experimental fix for incorrect view edge visibility. */

@ -40,7 +40,7 @@ class uv_phi {
float2 translation; float2 translation;
float rotation; float rotation;
/* bool reflect; */ // bool reflect;
}; };
uv_phi::uv_phi() : translation(-1.0f, -1.0f), rotation(0.0f) uv_phi::uv_phi() : translation(-1.0f, -1.0f), rotation(0.0f)
@ -1358,7 +1358,7 @@ static uv_phi find_best_fit_for_island(const PackIsland *island,
uv_phi phi; uv_phi phi;
phi.rotation = DEG2RADF(angle_90_multiple * 90); phi.rotation = DEG2RADF(angle_90_multiple * 90);
/* phi.reflect = reflect; */ // phi.reflect = reflect;
float matrix[2][2]; float matrix[2][2];
island->build_transformation(scale, phi.rotation, matrix); island->build_transformation(scale, phi.rotation, matrix);

@ -2708,12 +2708,12 @@ static bool p_chart_abf_solve(PChart *chart)
p_abf_compute_sines(&sys); p_abf_compute_sines(&sys);
/* iteration */ /* iteration */
/* lastnorm = 1e10; */ /* UNUSED */ // lastnorm = 1e10; /* UNUSED. */
for (i = 0; i < ABF_MAX_ITER; i++) { for (i = 0; i < ABF_MAX_ITER; i++) {
float norm = p_abf_compute_gradient(&sys, chart); float norm = p_abf_compute_gradient(&sys, chart);
/* lastnorm = norm; */ /* UNUSED */ // lastnorm = norm; /* UNUSED. */
if (norm < limit) { if (norm < limit) {
break; break;

@ -101,7 +101,7 @@ static void buffer_from_list_inputs_sort(ListBase *inputs)
return; return;
} }
/* Creates a lookup table for the different types; */ /* Creates a lookup table for the different types. */
LinkData *inputs_lookup[MAX_UBO_GPU_TYPE + 1] = {nullptr}; LinkData *inputs_lookup[MAX_UBO_GPU_TYPE + 1] = {nullptr};
eGPUType cur_type = static_cast<eGPUType>(MAX_UBO_GPU_TYPE + 1); eGPUType cur_type = static_cast<eGPUType>(MAX_UBO_GPU_TYPE + 1);

@ -258,7 +258,7 @@ void GPU_vertformat_safe_attr_name(const char *attr_name, char *r_safe_name, uin
uint len = strlen(attr_name); uint len = strlen(attr_name);
if (len > 8) { if (len > 8) {
/* Start with the first 4 chars of the name; */ /* Start with the first 4 chars of the name. */
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
data[i] = attr_name[i]; data[i] = attr_name[i];
} }

@ -457,7 +457,7 @@ void MTLBufferPool::insert_buffer_into_pool(MTLResourceOptions options, gpu::MTL
* can reset this state. * can reset this state.
* TODO(Metal): Purgeability state does not update instantly, so this requires a deferral. */ * TODO(Metal): Purgeability state does not update instantly, so this requires a deferral. */
BLI_assert(buffer->get_metal_buffer()); BLI_assert(buffer->get_metal_buffer());
/* buffer->metal_buffer); [buffer->metal_buffer setPurgeableState:MTLPurgeableStateVolatile]; */ // buffer->metal_buffer); [buffer->metal_buffer setPurgeableState:MTLPurgeableStateVolatile];
std::multiset<MTLBufferHandle, CompareMTLBuffer> *pool = buffer_pools_.lookup(options); std::multiset<MTLBufferHandle, CompareMTLBuffer> *pool = buffer_pools_.lookup(options);
pool->insert(MTLBufferHandle(buffer)); pool->insert(MTLBufferHandle(buffer));

@ -377,7 +377,7 @@ struct MSLFragmentOutputAttribute {
using MSLFragmentTileInputAttribute = MSLFragmentOutputAttribute; using MSLFragmentTileInputAttribute = MSLFragmentOutputAttribute;
struct MSLSharedMemoryBlock { struct MSLSharedMemoryBlock {
/* e.g. shared vec4 color_cache[cache_size][cache_size]; */ /* e.g. `shared vec4 color_cache[cache_size][cache_size];`. */
std::string type_name; std::string type_name;
std::string varname; std::string varname;
bool is_array; bool is_array;

@ -578,19 +578,19 @@ inline MTLPixelFormat mtl_format_get_writeable_view_format(MTLPixelFormat format
case MTLPixelFormatDepth32Float: case MTLPixelFormatDepth32Float:
return MTLPixelFormatR32Float; return MTLPixelFormatR32Float;
case MTLPixelFormatDepth32Float_Stencil8: case MTLPixelFormatDepth32Float_Stencil8:
/* return MTLPixelFormatRG32Float; */ // return MTLPixelFormatRG32Float;
/* No alternative mirror format. This should not be used for /* No alternative mirror format. This should not be used for
* manual data upload */ * manual data upload */
return MTLPixelFormatInvalid; return MTLPixelFormatInvalid;
case MTLPixelFormatBGR10A2Unorm: case MTLPixelFormatBGR10A2Unorm:
/* return MTLPixelFormatBGRA8Unorm; */ // return MTLPixelFormatBGRA8Unorm;
/* No alternative mirror format. This should not be used for /* No alternative mirror format. This should not be used for
* manual data upload */ * manual data upload */
return MTLPixelFormatInvalid; return MTLPixelFormatInvalid;
case MTLPixelFormatDepth24Unorm_Stencil8: case MTLPixelFormatDepth24Unorm_Stencil8:
/* No direct format, but we'll just mirror the bytes -- `Uint` /* No direct format, but we'll just mirror the bytes -- `Uint`
* should ensure bytes are not re-normalized or manipulated */ * should ensure bytes are not re-normalized or manipulated */
/* return MTLPixelFormatR32Uint; */ // return MTLPixelFormatR32Uint;
return MTLPixelFormatInvalid; return MTLPixelFormatInvalid;
default: default:
return format; return format;

@ -356,7 +356,7 @@ LogImageFile *cineonCreate(
{ {
CineonMainHeader header; CineonMainHeader header;
const char *shortFilename = nullptr; const char *shortFilename = nullptr;
/* uchar pad[6044]; */ // uchar pad[6044];
LogImageFile *cineon = (LogImageFile *)MEM_mallocN(sizeof(LogImageFile), __func__); LogImageFile *cineon = (LogImageFile *)MEM_mallocN(sizeof(LogImageFile), __func__);
if (cineon == nullptr) { if (cineon == nullptr) {

@ -1701,7 +1701,7 @@ Object *AnimationImporter::translate_animation_OLD(
calc_joint_parent_mat_rest(par, nullptr, root, node); calc_joint_parent_mat_rest(par, nullptr, root, node);
mul_m4_m4m4(temp, par, matfra); mul_m4_m4m4(temp, par, matfra);
/* evaluate_joint_world_transform_at_frame(temp, nullptr, node, fra); */ // evaluate_joint_world_transform_at_frame(temp, nullptr, node, fra);
/* calc special matrix */ /* calc special matrix */
mul_m4_series(mat, irest, temp, irest_dae, rest); mul_m4_series(mat, irest, temp, irest_dae, rest);

@ -40,7 +40,7 @@ class ArmatureImporter;
class AnimationImporterBase { class AnimationImporterBase {
public: public:
/* virtual void change_eul_to_quat(Object *ob, bAction *act) = 0; */ // virtual void change_eul_to_quat(Object *ob, bAction *act) = 0;
}; };
class AnimationImporter : private TransformReader, public AnimationImporterBase { class AnimationImporter : private TransformReader, public AnimationImporterBase {

@ -476,7 +476,7 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object *
if (ma) { if (ma) {
action = bc_getSceneMaterialAction(ma); action = bc_getSceneMaterialAction(ma);
if (action) { if (action) {
/* isMatAnim = true; */ // isMatAnim = true;
FCurve *fcu = (FCurve *)action->curves.first; FCurve *fcu = (FCurve *)action->curves.first;
for (; fcu; fcu = fcu->next) { for (; fcu; fcu = fcu->next) {
BCCurveKey key(object_type, fcu->rna_path, fcu->array_index, a); BCCurveKey key(object_type, fcu->rna_path, fcu->array_index, a);

@ -651,7 +651,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
} }
} }
/* create_constraints(et,ob); */ // create_constraints(et, ob);
} }
for (Object *ob : *objects_done) { for (Object *ob : *objects_done) {
@ -1091,7 +1091,7 @@ bool DocumentImporter::writeAnimationList(const COLLADAFW::AnimationList *animat
return true; return true;
} }
/* return true; */ // return true;
return anim_importer.write_animation_list(animationList); return anim_importer.write_animation_list(animationList);
} }

@ -572,7 +572,7 @@ void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)
if (loose_edge_count > 0) { if (loose_edge_count > 0) {
uint face_edge_count = me->totedge; uint face_edge_count = me->totedge;
/* uint total_edge_count = loose_edge_count + face_edge_count; */ /* UNUSED */ // uint total_edge_count = loose_edge_count + face_edge_count; /* UNUSED. */
mesh_add_edges(me, loose_edge_count); mesh_add_edges(me, loose_edge_count);
MutableSpan<blender::int2> edges = me->edges_for_write(); MutableSpan<blender::int2> edges = me->edges_for_write();

@ -43,7 +43,7 @@ class SkinInfo {
COLLADAFW::UIntValuesArray joints_per_vertex; COLLADAFW::UIntValuesArray joints_per_vertex;
COLLADAFW::UIntValuesArray weight_indices; COLLADAFW::UIntValuesArray weight_indices;
COLLADAFW::IntValuesArray joint_indices; COLLADAFW::IntValuesArray joint_indices;
/* COLLADAFW::FloatOrDoubleArray weights; */ // COLLADAFW::FloatOrDoubleArray weights;
std::vector<float> weights; std::vector<float> weights;
std::vector<JointData> joint_data; /* index to this vector is joint index */ std::vector<JointData> joint_data; /* index to this vector is joint index */

@ -325,7 +325,7 @@ typedef struct Object {
struct Object *proxy_from DNA_DEPRECATED; struct Object *proxy_from DNA_DEPRECATED;
/** Old animation system, deprecated for 2.5. */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED; struct Ipo *ipo DNA_DEPRECATED;
/* struct Path *path; */ // struct Path *path;
struct bAction *action DNA_DEPRECATED; /* XXX deprecated... old animation system */ struct bAction *action DNA_DEPRECATED; /* XXX deprecated... old animation system */
struct bAction *poselib DNA_DEPRECATED; /* Pre-Blender 3.0 pose library, deprecated in 3.5. */ struct bAction *poselib DNA_DEPRECATED; /* Pre-Blender 3.0 pose library, deprecated in 3.5. */
/** Pose data, armature objects only. */ /** Pose data, armature objects only. */

@ -75,8 +75,8 @@ typedef struct StripColorBalance {
float power[3]; float power[3];
int flag; int flag;
char _pad[4]; char _pad[4];
/* float exposure; */ // float exposure;
/* float saturation; */ // float saturation;
} StripColorBalance; } StripColorBalance;
typedef struct StripProxy { typedef struct StripProxy {

@ -73,7 +73,7 @@ typedef struct bSound {
/** Spin-lock for asynchronous loading of sounds. */ /** Spin-lock for asynchronous loading of sounds. */
void *spinlock; void *spinlock;
/* XXX unused currently (SOUND_TYPE_LIMITER) */ /* XXX unused currently (SOUND_TYPE_LIMITER) */
/* float start, end; */ // float start, end;
/* Description of Audio channels, as of #eSoundChannels. */ /* Description of Audio channels, as of #eSoundChannels. */
int audio_channels; int audio_channels;

@ -1340,7 +1340,7 @@ static int make_structDNA(const char *base_directory,
/* FOR DEBUG */ /* FOR DEBUG */
if (debugSDNA > 1) { if (debugSDNA > 1) {
int a, b; int a, b;
/* short *elem; */ // short *elem;
short num_types; short num_types;
printf("names_len %d types_len %d structs_len %d\n", names_len, types_len, structs_len); printf("names_len %d types_len %d structs_len %d\n", names_len, types_len, structs_len);

@ -2374,7 +2374,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
} }
case PROP_POINTER: { case PROP_POINTER: {
fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func); fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func);
/*fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func); */ // fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func);
break; break;
} }
case PROP_COLLECTION: { case PROP_COLLECTION: {

Some files were not shown because too many files have changed in this diff Show More