Cleanup: remove foreach macro from .clang-format
The usage of that macro was removed in 60bec183cb,
but it was still in our .clang-format file. This lead to worse formatting when other code
used methods named `foreach`.
Pull Request: https://projects.blender.org/blender/blender/pulls/137468
This commit is contained in:
@@ -258,7 +258,6 @@ ForEachMacros:
|
|||||||
- SEQ_ALL_BEGIN
|
- SEQ_ALL_BEGIN
|
||||||
- SEQ_ITERATOR_FOREACH
|
- SEQ_ITERATOR_FOREACH
|
||||||
- SURFACE_QUAD_ITER_BEGIN
|
- SURFACE_QUAD_ITER_BEGIN
|
||||||
- foreach
|
|
||||||
- ED_screen_areas_iter
|
- ED_screen_areas_iter
|
||||||
- SLOT_PROBING_BEGIN
|
- SLOT_PROBING_BEGIN
|
||||||
- SET_SLOT_PROBING_BEGIN
|
- SET_SLOT_PROBING_BEGIN
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ static void merge_scalar_grids_for_velocity(const Scene *scene, Volume *volume)
|
|||||||
vecgrid->tree().topologyUnion(vel_z_grid->tree());
|
vecgrid->tree().topologyUnion(vel_z_grid->tree());
|
||||||
|
|
||||||
MergeScalarGrids op(&vel_x_grid->tree(), &vel_y_grid->tree(), &vel_z_grid->tree());
|
MergeScalarGrids op(&vel_x_grid->tree(), &vel_y_grid->tree(), &vel_z_grid->tree());
|
||||||
openvdb::tools::foreach (vecgrid->beginValueOn(), op, true, false);
|
openvdb::tools::foreach(vecgrid->beginValueOn(), op, true, false);
|
||||||
|
|
||||||
/* Assume all grids have the same transformation. */
|
/* Assume all grids have the same transformation. */
|
||||||
const openvdb::math::Transform::Ptr transform = openvdb::ConstPtrCast<openvdb::math::Transform>(
|
const openvdb::math::Transform::Ptr transform = openvdb::ConstPtrCast<openvdb::math::Transform>(
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ static openvdb::FloatGrid::Ptr mesh_to_density_grid_impl(
|
|||||||
openvdb::tools::sdfToFogVolume(*new_grid);
|
openvdb::tools::sdfToFogVolume(*new_grid);
|
||||||
|
|
||||||
if (density != 1.0f) {
|
if (density != 1.0f) {
|
||||||
openvdb::tools::foreach (new_grid->beginValueOn(),
|
openvdb::tools::foreach(new_grid->beginValueOn(),
|
||||||
[&](const openvdb::FloatGrid::ValueOnIter &iter) {
|
[&](const openvdb::FloatGrid::ValueOnIter &iter) {
|
||||||
iter.modifyValue([&](float &value) { value *= density; });
|
iter.modifyValue([&](float &value) { value *= density; });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ bke::VolumeGridData *fog_volume_grid_add_from_points(Volume *volume,
|
|||||||
openvdb::tools::sdfToFogVolume(*new_grid);
|
openvdb::tools::sdfToFogVolume(*new_grid);
|
||||||
|
|
||||||
/* Take the desired density into account. */
|
/* Take the desired density into account. */
|
||||||
openvdb::tools::foreach (new_grid->beginValueOn(),
|
openvdb::tools::foreach(new_grid->beginValueOn(),
|
||||||
[&](const openvdb::FloatGrid::ValueOnIter &iter) {
|
[&](const openvdb::FloatGrid::ValueOnIter &iter) {
|
||||||
iter.modifyValue([&](float &value) { value *= density; });
|
iter.modifyValue([&](float &value) { value *= density; });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ struct DisplaceGridOp {
|
|||||||
|
|
||||||
/* Run the operator. This is multi-threaded. It is important that the operator is not shared
|
/* Run the operator. This is multi-threaded. It is important that the operator is not shared
|
||||||
* between the threads, because it contains a non-thread-safe accessor for the old grid. */
|
* between the threads, because it contains a non-thread-safe accessor for the old grid. */
|
||||||
openvdb::tools::foreach (temp_grid->beginValueOn(),
|
openvdb::tools::foreach(temp_grid->beginValueOn(),
|
||||||
displace_op,
|
displace_op,
|
||||||
true,
|
true,
|
||||||
/* Disable sharing of the operator. */
|
/* Disable sharing of the operator. */
|
||||||
|
|||||||
Reference in New Issue
Block a user