Cleanup: various non functional changes

- Use const arguments.
- Quiet unused assignment warnings.
- Use explicit cast to suppress CPPCHECK's truncLongCastReturn warning.
This commit is contained in:
Campbell Barton
2024-09-23 11:00:51 +10:00
parent a74ad65e8e
commit 7feccafbb0
8 changed files with 16 additions and 11 deletions

View File

@@ -7,12 +7,12 @@
#include "internal/evaluator/eval_output.h"
namespace blender::opensubdiv {
bool is_adaptive(CpuPatchTable *patch_table)
bool is_adaptive(const CpuPatchTable *patch_table)
{
return patch_table->GetPatchArrayBuffer()[0].GetDescriptor().IsAdaptive();
}
bool is_adaptive(GLPatchTable *patch_table)
bool is_adaptive(const GLPatchTable *patch_table)
{
return patch_table->GetPatchArrays()[0].GetDescriptor().IsAdaptive();
}

View File

@@ -161,8 +161,8 @@ class ConstPatchCoordWrapperBuffer : public RawDataWrapperVertexBuffer<const Pat
// Discriminators used in FaceVaryingVolatileEval in order to detect whether we are using adaptive
// patches as the CPU and OpenGL PatchTable have different APIs.
bool is_adaptive(CpuPatchTable *patch_table);
bool is_adaptive(GLPatchTable *patch_table);
bool is_adaptive(const CpuPatchTable *patch_table);
bool is_adaptive(const GLPatchTable *patch_table);
template<typename EVAL_VERTEX_BUFFER,
typename STENCIL_TABLE,