Refactor: Cycles: Replace foreach() by range based for loops

Pull Request: https://projects.blender.org/blender/blender/pulls/132361
This commit is contained in:
Brecht Van Lommel
2024-12-26 19:41:25 +01:00
parent 71b8ecdd84
commit 60bec183cb
65 changed files with 359 additions and 380 deletions

View File

@@ -15,7 +15,7 @@
#include "session/merge.h"
#include "util/debug.h"
#include "util/foreach.h"
#include "util/guiding.h"
#include "util/md5.h"
#include "util/openimagedenoise.h"
@@ -897,7 +897,7 @@ static PyObject *get_device_types_func(PyObject * /*self*/, PyObject * /*args*/)
vector<DeviceType> device_types = Device::available_types();
bool has_cuda = false, has_optix = false, has_hip = false, has_metal = false, has_oneapi = false,
has_hiprt = false;
foreach (DeviceType device_type, device_types) {
for (DeviceType device_type : device_types) {
has_cuda |= (device_type == DEVICE_CUDA);
has_optix |= (device_type == DEVICE_OPTIX);
has_hip |= (device_type == DEVICE_HIP);