Cleanup: remove spaces from commented arguments

Also use local enums for `MA_BM_*` in versioning code.
This commit is contained in:
Campbell Barton
2023-09-22 12:02:32 +10:00
parent 867f99c2af
commit 5fbcb4c27e
64 changed files with 138 additions and 138 deletions
@@ -159,7 +159,7 @@ void AS_asset_full_path_explode_from_weak_ref(const AssetWeakReference *asset_re
BLI_assert(!exploded->group_component.is_empty());
BLI_assert(!exploded->name_component.is_empty());
BLI_strncpy(r_path_buffer, exploded->full_path->c_str(), 1090 /* FILE_MAX_LIBEXTRA */);
BLI_strncpy(r_path_buffer, exploded->full_path->c_str(), 1090 /* #FILE_MAX_LIBEXTRA. */);
if (!exploded->dir_component.is_empty()) {
r_path_buffer[exploded->dir_component.size()] = '\0';
+1 -1
View File
@@ -149,7 +149,7 @@ bool IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONN
*/
bool IDP_InsertToGroup(struct IDProperty *group,
struct IDProperty *previous,
struct IDProperty *pnew) ATTR_NONNULL(1 /* group */, 3 /* pnew */);
struct IDProperty *pnew) ATTR_NONNULL(1 /*group*/, 3 /*pnew*/);
/**
* \note this does not free the property!
*
@@ -323,12 +323,10 @@ bool BKE_where_on_path(const Object *ob,
}
if (r_vec) {
r_vec[0] = /* X */
w[0] * p0->vec[0] + w[1] * p1->vec[0] + w[2] * p2->vec[0] + w[3] * p3->vec[0];
r_vec[1] = /* Y */
w[0] * p0->vec[1] + w[1] * p1->vec[1] + w[2] * p2->vec[1] + w[3] * p3->vec[1];
r_vec[2] = /* Z */
w[0] * p0->vec[2] + w[1] * p1->vec[2] + w[2] * p2->vec[2] + w[3] * p3->vec[2];
/* X, Y, Z axis. */
r_vec[0] = w[0] * p0->vec[0] + w[1] * p1->vec[0] + w[2] * p2->vec[0] + w[3] * p3->vec[0];
r_vec[1] = w[0] * p0->vec[1] + w[1] * p1->vec[1] + w[2] * p2->vec[1] + w[3] * p3->vec[1];
r_vec[2] = w[0] * p0->vec[2] + w[1] * p1->vec[2] + w[2] * p2->vec[2] + w[3] * p3->vec[2];
}
/* Clamp weights to 0-1 as we don't want to extrapolate other values than position. */
@@ -804,8 +804,7 @@ GAttributeReader AttributeAccessor::lookup_or_default(const AttributeIDRef &attr
Set<AttributeIDRef> AttributeAccessor::all_ids() const
{
Set<AttributeIDRef> ids;
this->for_all(
[&](const AttributeIDRef &attribute_id, const AttributeMetaData & /* meta_data */) {
this->for_all([&](const AttributeIDRef &attribute_id, const AttributeMetaData & /*meta_data*/) {
ids.add(attribute_id);
return true;
});
@@ -345,7 +345,7 @@ inline bool contains(const void *owner, const blender::bke::AttributeIDRef &attr
bool found = false;
for_all<providers>(
owner,
[&](const AttributeIDRef &other_attribute_id, const AttributeMetaData & /* meta_data */) {
[&](const AttributeIDRef &other_attribute_id, const AttributeMetaData & /*meta_data*/) {
if (attribute_id == other_attribute_id) {
found = true;
return false;
@@ -57,7 +57,7 @@ static PoseBackup *pose_backup_create(const Object *ob,
BoneNameSet backed_up_bone_names;
/* Make a backup of the given pose channel. */
auto store_animated_pchans = [&](FCurve * /* unused */, const char *bone_name) {
auto store_animated_pchans = [&](FCurve * /*unused*/, const char *bone_name) {
if (backed_up_bone_names.contains(bone_name)) {
/* Only backup each bone once. */
return;
+1 -1
View File
@@ -22,7 +22,7 @@ extern "C" {
*
* \note Performance is `O(n.log(n))`, same as `qsort`.
*/
int BLI_convexhull_2d(const float (*points)[2], int n, int r_points[/* n */]);
int BLI_convexhull_2d(const float (*points)[2], int n, int r_points[/*n*/]);
/**
* \return The best angle for fitting the points to an axis aligned bounding box.
@@ -185,9 +185,9 @@ class GVArray : public GVArrayCommon {
GVArray(const GVArrayImpl *impl);
GVArray(std::shared_ptr<const GVArrayImpl> impl);
GVArray(varray_tag::span /* tag */, GSpan span);
GVArray(varray_tag::single_ref /* tag */, const CPPType &type, int64_t size, const void *value);
GVArray(varray_tag::single /* tag */, const CPPType &type, int64_t size, const void *value);
GVArray(varray_tag::span /*tag*/, GSpan span);
GVArray(varray_tag::single_ref /*tag*/, const CPPType &type, int64_t size, const void *value);
GVArray(varray_tag::single /*tag*/, const CPPType &type, int64_t size, const void *value);
template<typename T> GVArray(const VArray<T> &varray);
template<typename T> VArray<T> typed() const;
@@ -822,7 +822,7 @@ template<typename T, bool UseSingle, bool UseSpan> struct GVArrayDevirtualizer {
/** \name Inline methods for #GVArray.
* \{ */
inline GVArray::GVArray(varray_tag::span /* tag */, const GSpan span)
inline GVArray::GVArray(varray_tag::span /*tag*/, const GSpan span)
{
/* Use const-cast because the underlying virtual array implementation is shared between const
* and non const data. */
@@ -830,7 +830,7 @@ inline GVArray::GVArray(varray_tag::span /* tag */, const GSpan span)
this->emplace<GVArrayImpl_For_GSpan_final>(mutable_span);
}
inline GVArray::GVArray(varray_tag::single_ref /* tag */,
inline GVArray::GVArray(varray_tag::single_ref /*tag*/,
const CPPType &type,
const int64_t size,
const void *value)
@@ -87,7 +87,7 @@ namespace detail {
template<typename T, T Value, size_t... I>
inline ValueSequence<T, ((I == 0) ? Value : Value)...> make_value_sequence_impl(
std::index_sequence<I...> /* indices */)
std::index_sequence<I...> /*indices*/)
{
return {};
}
@@ -96,8 +96,8 @@ template<typename T, T Value1, T Value2, size_t... Value1Indices, size_t... I>
inline ValueSequence<T,
(ValueSequence<size_t, Value1Indices...>::template contains<I>() ? Value1 :
Value2)...>
make_two_value_sequence_impl(ValueSequence<size_t, Value1Indices...> /* value1_indices */,
std::index_sequence<I...> /* indices */)
make_two_value_sequence_impl(ValueSequence<size_t, Value1Indices...> /*value1_indices*/,
std::index_sequence<I...> /*indices*/)
{
return {};
};
+2 -2
View File
@@ -797,12 +797,12 @@ template<typename T> class VArray : public VArrayCommon<T> {
VArray(std::shared_ptr<const VArrayImpl<T>> impl) : VArrayCommon<T>(std::move(impl)) {}
VArray(varray_tag::span /* tag */, Span<T> span)
VArray(varray_tag::span /*tag*/, Span<T> span)
{
this->template emplace<VArrayImpl_For_Span_final<T>>(span);
}
VArray(varray_tag::single /* tag */, T value, const int64_t size)
VArray(varray_tag::single /*tag*/, T value, const int64_t size)
{
this->template emplace<VArrayImpl_For_Single<T>>(std::move(value), size);
}
@@ -651,10 +651,7 @@ GVArray::GVArray(const GVArrayImpl *impl) : GVArrayCommon(impl) {}
GVArray::GVArray(std::shared_ptr<const GVArrayImpl> impl) : GVArrayCommon(std::move(impl)) {}
GVArray::GVArray(varray_tag::single /* tag */,
const CPPType &type,
int64_t size,
const void *value)
GVArray::GVArray(varray_tag::single /*tag*/, const CPPType &type, int64_t size, const void *value)
{
if (type.is_trivial() && type.size() <= 16 && type.alignment() <= 8) {
this->emplace<GVArrayImpl_For_SmallTrivialSingleValue<16>>(type, size, value);
+1 -1
View File
@@ -53,7 +53,7 @@ struct RangeTask {
}
/* Splitting constructor for parallel reduce. */
RangeTask(RangeTask &other, tbb::split /* unused */)
RangeTask(RangeTask &other, tbb::split /*unused*/)
: func(other.func), userdata(other.userdata), settings(other.settings)
{
init_chunk(settings->userdata_chunk);
+1 -4
View File
@@ -1443,10 +1443,7 @@ static void *newpackedadr(FileData *fd, const void *adr)
}
/* only lib data */
static void *newlibadr(FileData *fd,
ID * /* self_id */,
const bool is_linked_only,
const void *adr)
static void *newlibadr(FileData *fd, ID * /*self_id*/, const bool is_linked_only, const void *adr)
{
return oldnewmap_liblookup(fd->libmap, adr, is_linked_only);
}
@@ -662,7 +662,11 @@ static void do_versions_material_convert_legacy_blend_mode(bNodeTree *ntree, cha
continue;
}
if (blend_method == 1 /* MA_BM_ADD */) {
enum {
MA_BM_ADD = 1,
MA_BM_MULTIPLY = 2,
};
if (blend_method == MA_BM_ADD) {
nodeRemLink(ntree, link);
bNode *add_node = nodeAddStaticNode(nullptr, ntree, SH_NODE_ADD_SHADER);
@@ -686,7 +690,7 @@ static void do_versions_material_convert_legacy_blend_mode(bNodeTree *ntree, cha
need_update = true;
}
else if (blend_method == 2 /* MA_BM_MULTIPLY */) {
else if (blend_method == MA_BM_MULTIPLY) {
nodeRemLink(ntree, link);
bNode *transp_node = nodeAddStaticNode(nullptr, ntree, SH_NODE_BSDF_TRANSPARENT);
@@ -1682,9 +1686,7 @@ struct MappingNodeFCurveCallbackData {
* update if the rna path starts with the rna path of the mapping node and
* doesn't end with "default_value", that is, not the Vector input.
*/
static void update_mapping_node_fcurve_rna_path_callback(ID * /* id */,
FCurve *fcurve,
void *_data)
static void update_mapping_node_fcurve_rna_path_callback(ID * /*id*/, FCurve *fcurve, void *_data)
{
MappingNodeFCurveCallbackData *data = (MappingNodeFCurveCallbackData *)_data;
if (!STRPREFIX(fcurve->rna_path, data->nodePath) ||
@@ -2688,17 +2690,21 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain)
* now that we use dual-source blending. */
/* We take care of doing only node-trees that are always part of materials
* with old blending modes. */
enum {
MA_BM_ADD = 1,
MA_BM_MULTIPLY = 2,
};
LISTBASE_FOREACH (Material *, ma, &bmain->materials) {
bNodeTree *ntree = ma->nodetree;
if (ma->blend_method == 1 /* MA_BM_ADD */) {
if (ma->blend_method == MA_BM_ADD) {
if (ma->use_nodes) {
do_versions_material_convert_legacy_blend_mode(ntree, 1 /* MA_BM_ADD */);
do_versions_material_convert_legacy_blend_mode(ntree, MA_BM_ADD);
}
ma->blend_method = MA_BM_BLEND;
}
else if (ma->blend_method == 2 /* MA_BM_MULTIPLY */) {
else if (ma->blend_method == MA_BM_MULTIPLY) {
if (ma->use_nodes) {
do_versions_material_convert_legacy_blend_mode(ntree, 2 /* MA_BM_MULTIPLY */);
do_versions_material_convert_legacy_blend_mode(ntree, MA_BM_MULTIPLY);
}
ma->blend_method = MA_BM_BLEND;
}
@@ -51,7 +51,7 @@ void KuwaharaAnisotropicOperation::deinit_execution()
void KuwaharaAnisotropicOperation::execute_pixel_sampled(float output[4],
float x_float,
float y_float,
PixelSampler /* sampler */)
PixelSampler /*sampler*/)
{
using namespace math;
const int x = x_float;
@@ -39,7 +39,7 @@ void KuwaharaAnisotropicStructureTensorOperation::deinit_execution()
void KuwaharaAnisotropicStructureTensorOperation::execute_pixel_sampled(float output[4],
float x_float,
float y_float,
PixelSampler /* sampler */)
PixelSampler /*sampler*/)
{
using math::max, math::min, math::dot;
const int x = x_float;
@@ -58,20 +58,20 @@ void *EEVEE_NEXT_lightbake_job_data_alloc(Main *bmain,
* Free the job data.
* NOTE: Does not free the GPUContext. This is the responsibility of `EEVEE_NEXT_lightbake_job()`
*/
void EEVEE_NEXT_lightbake_job_data_free(void *job_data /* EEVEE_NEXT_LightBake */);
void EEVEE_NEXT_lightbake_job_data_free(/*EEVEE_NEXT_LightBake*/ void *job_data);
/**
* Callback for updating original scene light cache with bake result.
* Run by the job system for each update step and the finish step.
* This is called manually by `EEVEE_NEXT_lightbake_job()` if not run from a job.
*/
void EEVEE_NEXT_lightbake_update(void *job_data /* EEVEE_NEXT_LightBake */);
void EEVEE_NEXT_lightbake_update(/*EEVEE_NEXT_LightBake*/ void *job_data);
/**
* Do the full light baking for all samples.
* Will call `EEVEE_NEXT_lightbake_update()` on finish.
*/
void EEVEE_NEXT_lightbake_job(void *job_data /* EEVEE_NEXT_LightBake */,
void EEVEE_NEXT_lightbake_job(/*EEVEE_NEXT_LightBake*/ void *job_data,
bool *stop,
bool *do_update,
float *progress);
@@ -186,7 +186,7 @@ void RayTraceModule::sync()
void RayTraceModule::debug_pass_sync() {}
void RayTraceModule::debug_draw(View & /* view */, GPUFrameBuffer * /* view_fb */) {}
void RayTraceModule::debug_draw(View & /*view*/, GPUFrameBuffer * /*view_fb*/) {}
RayTraceResult RayTraceModule::trace(RayTraceBuffer &rt_buffer,
GPUTexture *screen_radiance_tx,
@@ -16,7 +16,7 @@
/* Return scene linear Z depth from the camera or radial depth for panoramic cameras. */
float film_depth_convert_to_scene(float depth)
{
if (false /* Panoramic */) {
if (false /* Panoramic. */) {
/* TODO */
return 1.0;
}
@@ -434,7 +434,7 @@ void fragment_displacement()
vec3 coordinate_camera(vec3 P)
{
vec3 vP;
if (false /* probe */) {
if (false /* Probe. */) {
/* Unsupported. It would make the probe camera-dependent. */
vP = P;
}
@@ -452,7 +452,7 @@ vec3 coordinate_camera(vec3 P)
vec3 coordinate_screen(vec3 P)
{
vec3 window = vec3(0.0);
if (false /* probe */) {
if (false /* Probe. */) {
/* Unsupported. It would make the probe camera-dependent. */
window.xy = vec2(0.5);
}
@@ -108,7 +108,7 @@ class Instance {
anti_aliasing.init(v3d, scene);
}
void begin_sync(Manager & /* manager */)
void begin_sync(Manager & /*manager*/)
{
/* TODO(fclem): Remove global draw manager access. */
View main_view("GPencil_MainView", DRW_view_default_get());
@@ -150,7 +150,7 @@ class Instance {
}
}
void end_sync(Manager & /* manager */)
void end_sync(Manager & /*manager*/)
{
objects.end_sync();
layers.end_sync();
+6 -6
View File
@@ -176,17 +176,17 @@ struct ResourceBind {
: slot(slot_), is_reference(false), type(Type::StorageBuf), storage_buf(res){};
ResourceBind(int slot_, GPUStorageBuf **res)
: slot(slot_), is_reference(true), type(Type::StorageBuf), storage_buf_ref(res){};
ResourceBind(int slot_, GPUUniformBuf *res, Type /* type */)
ResourceBind(int slot_, GPUUniformBuf *res, Type /*type*/)
: slot(slot_), is_reference(false), type(Type::UniformAsStorageBuf), uniform_buf(res){};
ResourceBind(int slot_, GPUUniformBuf **res, Type /* type */)
ResourceBind(int slot_, GPUUniformBuf **res, Type /*type*/)
: slot(slot_), is_reference(true), type(Type::UniformAsStorageBuf), uniform_buf_ref(res){};
ResourceBind(int slot_, GPUVertBuf *res, Type /* type */)
ResourceBind(int slot_, GPUVertBuf *res, Type /*type*/)
: slot(slot_), is_reference(false), type(Type::VertexAsStorageBuf), vertex_buf(res){};
ResourceBind(int slot_, GPUVertBuf **res, Type /* type */)
ResourceBind(int slot_, GPUVertBuf **res, Type /*type*/)
: slot(slot_), is_reference(true), type(Type::VertexAsStorageBuf), vertex_buf_ref(res){};
ResourceBind(int slot_, GPUIndexBuf *res, Type /* type */)
ResourceBind(int slot_, GPUIndexBuf *res, Type /*type*/)
: slot(slot_), is_reference(false), type(Type::IndexAsStorageBuf), index_buf(res){};
ResourceBind(int slot_, GPUIndexBuf **res, Type /* type */)
ResourceBind(int slot_, GPUIndexBuf **res, Type /*type*/)
: slot(slot_), is_reference(true), type(Type::IndexAsStorageBuf), index_buf_ref(res){};
ResourceBind(int slot_, draw::Image *res)
: slot(slot_), is_reference(false), type(Type::Image), texture(draw::as_texture(res)){};
@@ -92,7 +92,7 @@ static bool active_bone_collection_poll(bContext *C)
return true;
}
static int bone_collection_add_exec(bContext *C, wmOperator * /* op */)
static int bone_collection_add_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
if (ob == nullptr) {
@@ -122,7 +122,7 @@ void ARMATURE_OT_collection_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int bone_collection_remove_exec(bContext *C, wmOperator * /* op */)
static int bone_collection_remove_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
if (ob == nullptr) {
@@ -6908,7 +6908,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but,
ColorPicker *cpicker = static_cast<ColorPicker *>(but->custom_data);
float *hsv = cpicker->hsv_perceptual;
float rgb[3];
float phi, r /*, sqr */ /* UNUSED */, v[2];
float phi, r, v[2];
const float sensitivity = (shift ? 0.06f : 0.3f) * ndof->dt;
ui_but_v3_get(but, rgb);
@@ -6918,7 +6918,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but,
/* Convert current color on hue/sat disc to circular coordinates phi, r */
phi = fmodf(hsv[0] + 0.25f, 1.0f) * -2.0f * float(M_PI);
r = hsv[1];
/* sqr = r > 0.0f ? sqrtf(r) : 1; */ /* UNUSED */
// const float sqr = r > 0.0f ? sqrtf(r) : 1; /* UNUSED */
/* Convert to 2d vectors */
v[0] = r * cosf(phi);
@@ -175,9 +175,9 @@ uiListNameFilter::~uiListNameFilter()
MEM_SAFE_FREE(storage_.filter_dyn);
}
eUIListFilterResult uiListNameFilter::operator()(const PointerRNA & /* itemptr */,
eUIListFilterResult uiListNameFilter::operator()(const PointerRNA & /*itemptr*/,
StringRefNull name,
int /* index */)
int /*index*/)
{
if (!filter_) {
return UI_LIST_ITEM_FILTER_MATCHES;
@@ -2066,7 +2066,10 @@ void GRAPH_OT_clickselect(wmOperatorType *ot)
}
/** \} */
/* Key/handles selection */
/* -------------------------------------------------------------------- */
/** \name Key/handles Selection Operator
* \{ */
/* Defines for key/handles select tool. */
static const EnumPropertyItem prop_graphkeys_select_key_handles_actions[] = {
@@ -2179,7 +2182,7 @@ static int graphkeys_select_key_handles_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static void graphkeys_select_key_handles_ui(bContext * /* C */, wmOperator *op)
static void graphkeys_select_key_handles_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
uiLayout *row;
@@ -2227,3 +2230,5 @@ void GRAPH_OT_select_key_handles(wmOperatorType *ot)
"Key",
"Effect on the key itself");
}
/** \} */
@@ -1222,7 +1222,7 @@ static const SocketColorFn std_node_socket_color_funcs[] = {
std_node_socket_color_fn<SOCK_RGBA>,
std_node_socket_color_fn<SOCK_SHADER>,
std_node_socket_color_fn<SOCK_BOOLEAN>,
nullptr /* UNUSED */,
nullptr /* UNUSED. */,
std_node_socket_color_fn<SOCK_INT>,
std_node_socket_color_fn<SOCK_STRING>,
std_node_socket_color_fn<SOCK_OBJECT>,
@@ -18,15 +18,15 @@
namespace blender::ed::outliner {
TreeElementConstraintBase::TreeElementConstraintBase(TreeElement &legacy_te, Object & /* object */)
: AbstractTreeElement(legacy_te) /* , object_(object) */
TreeElementConstraintBase::TreeElementConstraintBase(TreeElement &legacy_te, Object & /*object*/)
: AbstractTreeElement(legacy_te) /*, object_(object) */
{
BLI_assert(legacy_te.store_elem->type == TSE_CONSTRAINT_BASE);
legacy_te.name = IFACE_("Constraints");
}
TreeElementConstraint::TreeElementConstraint(TreeElement &legacy_te,
Object & /* object */,
Object & /*object*/,
bConstraint &con)
: AbstractTreeElement(legacy_te), /* object_(object), */ con_(con)
{
@@ -39,7 +39,7 @@ void TreeElementDeformGroupBase::expand(SpaceOutliner & /*space_outliner*/) cons
}
TreeElementDeformGroup::TreeElementDeformGroup(TreeElement &legacy_te,
Object & /* object */,
Object & /*object*/,
bDeformGroup &defgroup)
: AbstractTreeElement(legacy_te), /* object_(object), */ defgroup_(defgroup)
{
@@ -36,7 +36,7 @@ void TreeElementGPencilEffectBase::expand(SpaceOutliner & /*space_outliner*/) co
}
TreeElementGPencilEffect::TreeElementGPencilEffect(TreeElement &legacy_te,
Object & /* object */,
Object & /*object*/,
ShaderFxData &fx)
: AbstractTreeElement(legacy_te), /* object_(object), */ fx_(fx)
{
@@ -16,7 +16,7 @@
namespace blender::ed::outliner {
TreeElementParticleSystem::TreeElementParticleSystem(TreeElement &legacy_te,
Object & /* object */,
Object & /*object*/,
ParticleSystem &psys)
: AbstractTreeElement(legacy_te), /* object_(object), */ psys_(psys)
{
@@ -76,7 +76,7 @@ void TreeElementPoseBase::expand(SpaceOutliner & /*space_outliner*/) const
/* -------------------------------------------------------------------- */
TreeElementPoseChannel::TreeElementPoseChannel(TreeElement &legacy_te,
Object & /* object */,
Object & /*object*/,
bPoseChannel &pchan)
: AbstractTreeElement(legacy_te), /* object_(object), */ pchan_(pchan)
{
@@ -35,7 +35,7 @@ void TreeElementViewLayerBase::expand(SpaceOutliner & /*space_outliner*/) const
}
TreeElementViewLayer::TreeElementViewLayer(TreeElement &legacy_te,
Scene & /* scene */,
Scene & /*scene*/,
ViewLayer &view_layer)
: AbstractTreeElement(legacy_te), /* scene_(scene), */ view_layer_(view_layer)
{
@@ -71,7 +71,7 @@ static bool gizmogroup_retime_poll(const bContext *C, wmGizmoGroupType *gzgt)
return true;
}
static void gizmogroup_retime_setup(const bContext * /* C */, wmGizmoGroup *gzgroup)
static void gizmogroup_retime_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
GizmoGroup_retime *ggd = (GizmoGroup_retime *)MEM_callocN(sizeof(GizmoGroup_retime), __func__);
@@ -521,7 +521,7 @@ void GIZMO_GT_retime_handle(wmGizmoType *gzt)
/** \name Retiming Remove Handle Gizmo
* \{ */
static void gizmo_retime_remove_draw(const bContext * /* C */, wmGizmo * /* gz */)
static void gizmo_retime_remove_draw(const bContext * /*C*/, wmGizmo * /*gz*/)
{
/* Pass. */
}
@@ -681,7 +681,7 @@ static void retime_speed_text_draw(const bContext *C,
UI_view2d_fromcontext(C), label_rect.xmin, label_rect.ymin, label_str, label_len, col);
}
static void gizmo_retime_speed_set_draw(const bContext *C, wmGizmo * /* gz */)
static void gizmo_retime_speed_set_draw(const bContext *C, wmGizmo * /*gz*/)
{
const View2D *v2d = UI_view2d_fromcontext(C);
@@ -73,7 +73,7 @@ static void retiming_handle_overlap(Scene *scene, Sequence *seq)
/** \name Retiming Reset
* \{ */
static int sequencer_retiming_reset_exec(bContext *C, wmOperator * /* op */)
static int sequencer_retiming_reset_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
const Editing *ed = SEQ_editing_get(scene);
@@ -52,14 +52,13 @@ namespace detail {
* Utility to implement #execute_lazy_function_eagerly.
*/
template<typename... Inputs, typename... Outputs, size_t... InIndices, size_t... OutIndices>
inline void execute_lazy_function_eagerly_impl(
const LazyFunction &fn,
inline void execute_lazy_function_eagerly_impl(const LazyFunction &fn,
UserData *user_data,
LocalUserData *local_user_data,
std::tuple<Inputs...> &inputs,
std::tuple<Outputs *...> &outputs,
std::index_sequence<InIndices...> /* in_indices */,
std::index_sequence<OutIndices...> /* out_indices */)
std::index_sequence<InIndices...> /*in_indices*/,
std::index_sequence<OutIndices...> /*out_indices*/)
{
constexpr size_t InputsNum = sizeof...(Inputs);
constexpr size_t OutputsNum = sizeof...(Outputs);
@@ -191,8 +191,8 @@ execute_materialized_impl(TypeSequence<ParamTags...> /*param_tags*/,
* chunks, which reduces virtual function call overhead.
*/
template<typename... ParamTags, size_t... I, typename ElementFn, typename... LoadedParams>
inline void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
std::index_sequence<I...> /* indices */,
inline void execute_materialized(TypeSequence<ParamTags...> /*param_tags*/,
std::index_sequence<I...> /*indices*/,
const ElementFn element_fn,
const IndexMaskSegment mask,
const std::tuple<LoadedParams...> &loaded_params)
@@ -144,7 +144,7 @@ class SignatureBuilder {
}
template<ParamCategory Category, typename T>
void add(ParamTag<Category, T> /* tag */, const char *name)
void add(ParamTag<Category, T> /*tag*/, const char *name)
{
switch (Category) {
case ParamCategory::SingleInput:
+1 -1
View File
@@ -697,7 +697,7 @@ static void pack_gobel(const Span<std::unique_ptr<UVAABBIsland>> aabbs,
static bool pack_islands_optimal_pack_table(const int table_count,
const float max_extent,
const float *optimal,
const char * /* unused_comment */,
const char * /*unused_comment*/,
int64_t island_count,
const float large_uv,
const Span<std::unique_ptr<UVAABBIsland>> aabbs,
+1 -1
View File
@@ -18,7 +18,7 @@
#include "nanosvgrast.h"
ImBuf *imb_load_filepath_thumbnail_svg(const char *filepath,
const int /* flags */,
const int /*flags*/,
const size_t max_thumb_size,
char colorspace[],
size_t *r_width,
+1 -1
View File
@@ -123,7 +123,7 @@ void MaterialData::update()
}
}
pxr::VtValue MaterialData::get_data(pxr::TfToken const & /* key */) const
pxr::VtValue MaterialData::get_data(pxr::TfToken const & /*key*/) const
{
return pxr::VtValue();
}
+1 -1
View File
@@ -85,7 +85,7 @@ void MeshData::update()
}
}
pxr::VtValue MeshData::get_data(pxr::TfToken const & /* key */) const
pxr::VtValue MeshData::get_data(pxr::TfToken const & /*key*/) const
{
return pxr::VtValue();
}
+3 -3
View File
@@ -102,7 +102,7 @@ bool ObjectData::is_visible(HydraSceneDelegate *scene_delegate, const Object *ob
return ret;
}
pxr::VtValue ObjectData::get_data(pxr::SdfPath const & /* id */, pxr::TfToken const &key) const
pxr::VtValue ObjectData::get_data(pxr::SdfPath const & /*id*/, pxr::TfToken const &key) const
{
return get_data(key);
}
@@ -112,12 +112,12 @@ pxr::SdfPath ObjectData::material_id() const
return pxr::SdfPath();
}
pxr::SdfPath ObjectData::material_id(pxr::SdfPath const & /* id */) const
pxr::SdfPath ObjectData::material_id(pxr::SdfPath const & /*id*/) const
{
return material_id();
}
void ObjectData::available_materials(Set<pxr::SdfPath> & /* paths */) const {}
void ObjectData::available_materials(Set<pxr::SdfPath> & /*paths*/) const {}
void ObjectData::write_transform()
{
@@ -478,7 +478,7 @@ bool USD_import(bContext *C,
* Object parameter, similar to the logic in get_abc_reader() in the
* Alembic importer code. */
static USDPrimReader *get_usd_reader(CacheReader *reader,
const Object * /* ob */,
const Object * /*ob*/,
const char **err_str)
{
USDPrimReader *usd_reader = reinterpret_cast<USDPrimReader *>(reader);
@@ -20,7 +20,7 @@
namespace blender::io::usd {
void USDCameraReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDCameraReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
Camera *bcam = static_cast<Camera *>(BKE_camera_add(bmain, name_.c_str()));
@@ -26,7 +26,7 @@
namespace blender::io::usd {
void USDCurvesReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDCurvesReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVES_LEGACY);
@@ -165,7 +165,7 @@ void USDCurvesReader::read_curve_sample(Curve *cu, const double motionSampleTime
Mesh *USDCurvesReader::read_mesh(Mesh *existing_mesh,
const USDMeshReadParams params,
const char ** /* err_str */)
const char ** /*err_str*/)
{
if (!curve_prim_) {
return existing_mesh;
@@ -24,7 +24,7 @@ class USDGeomReader : public USDXformReader {
USDMeshReadParams params,
const char **err_str) = 0;
virtual bool topology_changed(const Mesh * /* existing_mesh */, double /* motionSampleTime */)
virtual bool topology_changed(const Mesh * /*existing_mesh*/, double /*motionSampleTime*/)
{
return true;
}
@@ -22,7 +22,7 @@
namespace blender::io::usd {
void USDLightReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDLightReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
Light *blight = static_cast<Light *>(BKE_light_add(bmain, name_.c_str()));
@@ -795,9 +795,8 @@ void USDMaterialReader::load_tex_image(const pxr::UsdShadeShader &usd_shader,
}
}
void USDMaterialReader::convert_usd_primvar_reader_float2(
const pxr::UsdShadeShader &usd_shader,
const pxr::TfToken & /* usd_source_name */,
void USDMaterialReader::convert_usd_primvar_reader_float2(const pxr::UsdShadeShader &usd_shader,
const pxr::TfToken & /*usd_source_name*/,
bNode *dest_node,
const char *dest_socket_name,
bNodeTree *ntree,
@@ -228,7 +228,7 @@ static const std::optional<eAttrDomain> convert_usd_varying_to_blender(
return *value;
}
void USDMeshReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDMeshReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
Mesh *mesh = BKE_mesh_add(bmain, name_.c_str());
@@ -1062,7 +1062,7 @@ void USDMeshReader::readFaceSetsSample(Main *bmain, Mesh *mesh, const double mot
Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
const USDMeshReadParams params,
const char ** /* err_str */)
const char ** /*err_str*/)
{
if (!mesh_prim_) {
return existing_mesh;
@@ -44,7 +44,7 @@ static bool set_knots(const pxr::VtDoubleArray &knots, float *&nu_knots)
namespace blender::io::usd {
void USDNurbsReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDNurbsReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVES_LEGACY);
@@ -168,9 +168,9 @@ void USDNurbsReader::read_curve_sample(Curve *cu, const double motionSampleTime)
}
}
Mesh *USDNurbsReader::read_mesh(Mesh * /* existing_mesh */,
Mesh *USDNurbsReader::read_mesh(Mesh * /*existing_mesh*/,
const USDMeshReadParams params,
const char ** /* err_str */)
const char ** /*err_str*/)
{
pxr::UsdGeomCurves curve_prim_(prim_);
@@ -99,7 +99,7 @@ class USDPrimReader {
virtual bool valid() const;
virtual void create_object(Main *bmain, double motionSampleTime) = 0;
virtual void read_object_data(Main * /* bmain */, double /* motionSampleTime */){};
virtual void read_object_data(Main * /*bmain*/, double /*motionSampleTime*/){};
Object *object() const;
void object(Object *ob);
@@ -25,7 +25,7 @@ bool USDSkeletonReader::valid() const
return skel_ && USDXformReader::valid();
}
void USDSkeletonReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDSkeletonReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
object_ = BKE_object_add_only_object(bmain, OB_ARMATURE, name_.c_str());
@@ -25,7 +25,7 @@ static const pxr::TfToken density("density", pxr::TfToken::Immortal);
namespace blender::io::usd {
void USDVolumeReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDVolumeReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
Volume *volume = (Volume *)BKE_volume_add(bmain, name_.c_str());
@@ -31,14 +31,14 @@
namespace blender::io::usd {
void USDXformReader::create_object(Main *bmain, const double /* motionSampleTime */)
void USDXformReader::create_object(Main *bmain, const double /*motionSampleTime*/)
{
object_ = BKE_object_add_only_object(bmain, OB_EMPTY, name_.c_str());
object_->empty_drawsize = 0.1f;
object_->data = nullptr;
}
void USDXformReader::read_object_data(Main * /* bmain */, const double motionSampleTime)
void USDXformReader::read_object_data(Main * /*bmain*/, const double motionSampleTime)
{
bool is_constant;
float transform_from_usd[4][4];
@@ -1596,7 +1596,7 @@ static char *rna_SeqTimelineChannel_path(const PointerRNA *ptr)
}
static EQCurveMappingData *rna_Sequence_SoundEqualizer_Curve_add(SoundEqualizerModifierData *semd,
bContext * /* C */,
bContext * /*C*/,
float min_freq,
float max_freq)
{
@@ -1606,7 +1606,7 @@ static EQCurveMappingData *rna_Sequence_SoundEqualizer_Curve_add(SoundEqualizerM
}
static void rna_Sequence_SoundEqualizer_Curve_clear(SoundEqualizerModifierData *semd,
bContext * /* C */)
bContext * /*C*/)
{
SEQ_sound_equalizermodifier_free((SequenceModifierData *)semd);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
+1 -1
View File
@@ -27,7 +27,7 @@ static StructRNA *rna_USDHook_refine(PointerRNA *ptr)
return (hook->rna_ext.srna) ? hook->rna_ext.srna : &RNA_USDHook;
}
static bool rna_USDHook_unregister(Main * /* bmain */, StructRNA *type)
static bool rna_USDHook_unregister(Main * /*bmain*/, StructRNA *type)
{
USDHook *hook = static_cast<USDHook *>(RNA_struct_blender_type_get(type));
@@ -986,7 +986,7 @@ static StructRNA *rna_AddonPref_register(Main *bmain,
PointerRNA dummy_addon_ptr = RNA_pointer_create(nullptr, &RNA_AddonPreferences, &dummy_addon);
/* validate the python class */
if (validate(&dummy_addon_ptr, data, nullptr /* have_function */) != 0) {
if (validate(&dummy_addon_ptr, data, nullptr /*have_function*/) != 0) {
return nullptr;
}
+1 -1
View File
@@ -1167,7 +1167,7 @@ static StructRNA *rna_wmKeyConfigPref_register(Main *bmain,
PointerRNA dummy_kpt_ptr = RNA_pointer_create(nullptr, &RNA_KeyConfigPreferences, &dummy_kpt);
/* validate the python class */
if (validate(&dummy_kpt_ptr, data, nullptr /* have_function */) != 0) {
if (validate(&dummy_kpt_ptr, data, nullptr /*have_function*/) != 0) {
return nullptr;
}
@@ -3824,7 +3824,7 @@ PyTypeObject matrix_access_Type = {
/*tp_as_async*/ nullptr,
/*tp_repr*/ nullptr,
/*tp_as_number*/ nullptr,
/*tp_as_sequence*/ nullptr /* &MatrixAccess_SeqMethods */ /* TODO */,
/*tp_as_sequence*/ nullptr /* &MatrixAccess_SeqMethods */ /* TODO. */,
/*tp_as_mapping*/ &MatrixAccess_AsMapping,
/*tp_hash*/ nullptr,
/*tp_call*/ nullptr,
@@ -3836,7 +3836,7 @@ PyTypeObject matrix_access_Type = {
/*tp_doc*/ nullptr,
/*tp_traverse*/ (traverseproc)MatrixAccess_traverse,
/*tp_clear*/ (inquiry)MatrixAccess_clear,
/*tp_richcompare*/ nullptr /* MatrixAccess_richcmpr */ /* TODO */,
/*tp_richcompare*/ nullptr /* MatrixAccess_richcmpr */ /* TODO. */,
/*tp_weaklistoffset*/ 0,
/*tp_iter*/ (getiterfunc)MatrixAccess_iter,
/*tp_iternext*/ nullptr,
@@ -6,9 +6,9 @@
namespace blender::render::hydra {
void PreviewEngine::notify_status(float /* progress */,
const std::string & /* title */,
const std::string & /* info */)
void PreviewEngine::notify_status(float /*progress*/,
const std::string & /*title*/,
const std::string & /*info*/)
{
/* Empty function. */
}
+2 -2
View File
@@ -260,7 +260,7 @@ class Context : public realtime_compositor::Context {
return input_data_.view_name;
}
void set_info_message(StringRef /* message */) const override
void set_info_message(StringRef /*message*/) const override
{
/* TODO: ignored for now. Currently only used to communicate incomplete node support
* which is already shown on the node itself.
@@ -269,7 +269,7 @@ class Context : public realtime_compositor::Context {
* incomplete support, and leave more specific message to individual nodes? */
}
IDRecalcFlag query_id_recalc_flag(ID * /* id */) const override
IDRecalcFlag query_id_recalc_flag(ID * /*id*/) const override
{
/* TODO: implement? */
return IDRecalcFlag(0);
@@ -345,7 +345,7 @@ static void wm_file_read_setup_wm_keep_old(const bContext *C,
}
static void wm_file_read_setup_wm_use_new(bContext *C,
Main * /* bmain */,
Main * /*bmain*/,
BlendFileReadWMSetupData *wm_setup_data,
wmWindowManager *wm)
{