Refactor: Cycles: Automated clang-tidy fixups in Cycles
* Use .empty() and .data() * Use nullptr instead of 0 * No else after return * Simple class member initialization * Add override for virtual methods * Include C++ instead of C headers * Remove some unused includes * Use default constructors * Always use braces * Consistent names in definition and declaration * Change typedef to using Pull Request: https://projects.blender.org/blender/blender/pulls/132361
This commit is contained in:
@@ -4,12 +4,9 @@
|
||||
|
||||
#include "util/debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "bvh/params.h"
|
||||
#include <cstdlib>
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/string.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
@@ -73,15 +70,15 @@ void DebugFlags::Metal::reset()
|
||||
adaptive_compile = true;
|
||||
}
|
||||
|
||||
if (auto str = getenv("CYCLES_METAL_LOCAL_ATOMIC_SORT")) {
|
||||
if (auto *str = getenv("CYCLES_METAL_LOCAL_ATOMIC_SORT")) {
|
||||
use_local_atomic_sort = (atoi(str) != 0);
|
||||
}
|
||||
|
||||
if (auto str = getenv("CYCLES_METAL_NANOVDB")) {
|
||||
if (auto *str = getenv("CYCLES_METAL_NANOVDB")) {
|
||||
use_nanovdb = (atoi(str) != 0);
|
||||
}
|
||||
|
||||
if (auto str = getenv("CYCLES_METAL_ASYNC_PSO_CREATION")) {
|
||||
if (auto *str = getenv("CYCLES_METAL_ASYNC_PSO_CREATION")) {
|
||||
use_async_pso_creation = (atoi(str) != 0);
|
||||
}
|
||||
}
|
||||
@@ -96,11 +93,6 @@ void DebugFlags::OptiX::reset()
|
||||
use_debug = false;
|
||||
}
|
||||
|
||||
DebugFlags::DebugFlags()
|
||||
{
|
||||
/* Nothing for now. */
|
||||
}
|
||||
|
||||
void DebugFlags::reset()
|
||||
{
|
||||
cpu.reset();
|
||||
|
||||
Reference in New Issue
Block a user