Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug.cc4
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp4
-rw-r--r--source/blender/gpu/intern/gpu_context.cc6
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc2
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc16
-rw-r--r--source/blender/gpu/intern/gpu_platform.cc6
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.cc8
-rw-r--r--source/blender/gpu/intern/gpu_state.cc20
-rw-r--r--source/blender/gpu/intern/gpu_vertex_buffer.cc10
-rw-r--r--source/blender/gpu/opengl/gl_backend.cc10
-rw-r--r--source/blender/gpu/opengl/gl_batch.cc10
-rw-r--r--source/blender/gpu/opengl/gl_context.cc12
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc4
-rw-r--r--source/blender/gpu/opengl/gl_debug_layer.cc2
-rw-r--r--source/blender/gpu/opengl/gl_drawlist.cc4
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.cc6
-rw-r--r--source/blender/gpu/opengl/gl_immediate.cc2
-rw-r--r--source/blender/gpu/opengl/gl_index_buffer.cc2
-rw-r--r--source/blender/gpu/opengl/gl_query.cc4
-rw-r--r--source/blender/gpu/opengl/gl_shader.cc12
-rw-r--r--source/blender/gpu/opengl/gl_state.cc18
-rw-r--r--source/blender/gpu/opengl/gl_texture.cc16
-rw-r--r--source/blender/gpu/opengl/gl_uniform_buffer.cc4
-rw-r--r--source/blender/gpu/opengl/gl_vertex_buffer.cc10
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc2
-rw-r--r--source/blender/nodes/intern/node_socket.cc2
27 files changed, 98 insertions, 99 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 25be61ff649..92926de9eca 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -43,7 +43,6 @@ Checks: >
-modernize-use-emplace,
-modernize-use-nodiscard,
-modernize-use-using,
- -modernize-redundant-void-arg,
-modernize-use-bool-literals,
-modernize-loop-convert,
-modernize-pass-by-value,
diff --git a/source/blender/depsgraph/intern/debug/deg_debug.cc b/source/blender/depsgraph/intern/debug/deg_debug.cc
index ab6adea6416..b7310f3713e 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug.cc
@@ -73,7 +73,7 @@ void DepsgraphDebug::end_graph_evaluation()
is_ever_evaluated = true;
}
-bool terminal_do_color(void)
+bool terminal_do_color()
{
return (G.debug & G_DEBUG_DEPSGRAPH_PRETTY) != 0;
}
@@ -90,7 +90,7 @@ string color_for_pointer(const void *pointer)
return string(buffer);
}
-string color_end(void)
+string color_end()
{
if (!terminal_do_color()) {
return "";
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 2f465a973fc..92df844d0b3 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -188,7 +188,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer()
BKE_main_free(freestyle_bmain);
}
-float BlenderStrokeRenderer::get_stroke_vertex_z(void) const
+float BlenderStrokeRenderer::get_stroke_vertex_z() const
{
float z = _z;
BlenderStrokeRenderer *self = const_cast<BlenderStrokeRenderer *>(this);
@@ -199,7 +199,7 @@ float BlenderStrokeRenderer::get_stroke_vertex_z(void) const
return -z;
}
-unsigned int BlenderStrokeRenderer::get_stroke_mesh_id(void) const
+unsigned int BlenderStrokeRenderer::get_stroke_mesh_id() const
{
unsigned mesh_id = _mesh_id;
BlenderStrokeRenderer *self = const_cast<BlenderStrokeRenderer *>(this);
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc
index 119c1ef9c55..3ebfd80241d 100644
--- a/source/blender/gpu/intern/gpu_context.cc
+++ b/source/blender/gpu/intern/gpu_context.cc
@@ -80,12 +80,12 @@ Context::~Context()
delete imm;
}
-bool Context::is_active_on_thread(void)
+bool Context::is_active_on_thread()
{
return (this == active_ctx) && pthread_equal(pthread_self(), thread_);
}
-Context *Context::get(void)
+Context *Context::get()
{
return active_ctx;
}
@@ -188,7 +188,7 @@ void GPU_backend_exit(void)
g_backend = NULL;
}
-GPUBackend *GPUBackend::get(void)
+GPUBackend *GPUBackend::get()
{
return g_backend;
}
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index 8d9a1301be0..a16856e0dec 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -496,7 +496,7 @@ static void gpuPushFrameBuffer(GPUFrameBuffer *fb)
FrameBufferStack.top++;
}
-static GPUFrameBuffer *gpuPopFrameBuffer(void)
+static GPUFrameBuffer *gpuPopFrameBuffer()
{
BLI_assert(FrameBufferStack.top > 0);
FrameBufferStack.top--;
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 44c6cac02ca..9437f18cb14 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -41,17 +41,17 @@ using namespace blender::gpu;
static thread_local Immediate *imm = NULL;
-void immActivate(void)
+void immActivate()
{
imm = Context::get()->imm;
}
-void immDeactivate(void)
+void immDeactivate()
{
imm = NULL;
}
-GPUVertFormat *immVertexFormat(void)
+GPUVertFormat *immVertexFormat()
{
GPU_vertformat_clear(&imm->vertex_format);
return &imm->vertex_format;
@@ -81,7 +81,7 @@ void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
imm->builtin_shader_bound = shader_id;
}
-void immUnbindProgram(void)
+void immUnbindProgram()
{
BLI_assert(imm->shader != NULL);
@@ -90,7 +90,7 @@ void immUnbindProgram(void)
}
/* XXX do not use it. Special hack to use OCIO with batch API. */
-GPUShader *immGetShader(void)
+GPUShader *immGetShader()
{
return imm->shader;
}
@@ -187,7 +187,7 @@ static void wide_line_workaround_start(GPUPrimType prim_type)
}
}
-static void wide_line_workaround_end(void)
+static void wide_line_workaround_end()
{
if (imm->prev_shader) {
immUnbindProgram();
@@ -249,7 +249,7 @@ GPUBatch *immBeginBatchAtMost(GPUPrimType prim_type, uint vertex_len)
return immBeginBatch(prim_type, vertex_len);
}
-void immEnd(void)
+void immEnd()
{
BLI_assert(imm->prim_type != GPU_PRIM_NONE); /* Make sure we're between a Begin/End pair. */
BLI_assert(imm->vertex_data || imm->batch);
@@ -480,7 +480,7 @@ void immAttrSkip(uint attr_id)
setAttrValueBit(attr_id);
}
-static void immEndVertex(void) /* and move on to the next vertex */
+static void immEndVertex() /* and move on to the next vertex */
{
BLI_assert(imm->prim_type != GPU_PRIM_NONE); /* make sure we're between a Begin/End pair */
BLI_assert(imm->vertex_idx < imm->vertex_len);
diff --git a/source/blender/gpu/intern/gpu_platform.cc b/source/blender/gpu/intern/gpu_platform.cc
index ad7142878e7..6b9878f2ba4 100644
--- a/source/blender/gpu/intern/gpu_platform.cc
+++ b/source/blender/gpu/intern/gpu_platform.cc
@@ -77,7 +77,7 @@ void GPUPlatformGlobal::create_gpu_name(const char *vendor,
BLI_str_replace_char(gpu_name, '\r', ' ');
}
-void GPUPlatformGlobal::clear(void)
+void GPUPlatformGlobal::clear()
{
MEM_SAFE_FREE(GPG.support_key);
MEM_SAFE_FREE(GPG.gpu_name);
@@ -94,12 +94,12 @@ void GPUPlatformGlobal::clear(void)
using namespace blender::gpu;
-eGPUSupportLevel GPU_platform_support_level(void)
+eGPUSupportLevel GPU_platform_support_level()
{
return GPG.support_level;
}
-const char *GPU_platform_support_level_key(void)
+const char *GPU_platform_support_level_key()
{
return GPG.support_key;
}
diff --git a/source/blender/gpu/intern/gpu_shader_interface.cc b/source/blender/gpu/intern/gpu_shader_interface.cc
index e5fb8025e7f..81c1e013877 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.cc
+++ b/source/blender/gpu/intern/gpu_shader_interface.cc
@@ -32,12 +32,12 @@
namespace blender::gpu {
-ShaderInterface::ShaderInterface(void)
+ShaderInterface::ShaderInterface()
{
/* TODO(fclem): add unique ID for debugging. */
}
-ShaderInterface::~ShaderInterface(void)
+ShaderInterface::~ShaderInterface()
{
/* Free memory used by name_buffer. */
MEM_freeN(name_buffer_);
@@ -70,14 +70,14 @@ static void sort_input_list(MutableSpan<ShaderInput> dst)
/* Sorts all inputs inside their respective array.
* This is to allow fast hash collision detection.
* See ShaderInterface::input_lookup for more details. */
-void ShaderInterface::sort_inputs(void)
+void ShaderInterface::sort_inputs()
{
sort_input_list(MutableSpan<ShaderInput>(inputs_, attr_len_));
sort_input_list(MutableSpan<ShaderInput>(inputs_ + attr_len_, ubo_len_));
sort_input_list(MutableSpan<ShaderInput>(inputs_ + attr_len_ + ubo_len_, uniform_len_));
}
-void ShaderInterface::debug_print(void)
+void ShaderInterface::debug_print()
{
Span<ShaderInput> attrs = Span<ShaderInput>(inputs_, attr_len_);
Span<ShaderInput> ubos = Span<ShaderInput>(inputs_ + attr_len_, ubo_len_);
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index 0b2e4989a33..407a8dd6e2b 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -260,7 +260,7 @@ eGPUStencilTest GPU_stencil_test_get()
}
/* NOTE: Already premultiplied by U.pixelsize. */
-float GPU_line_width_get(void)
+float GPU_line_width_get()
{
GPUStateMutable &state = Context::get()->state_manager->mutable_state;
return state.line_width;
@@ -285,13 +285,13 @@ void GPU_viewport_size_get_i(int coords[4])
Context::get()->active_fb->viewport_get(coords);
}
-bool GPU_depth_mask_get(void)
+bool GPU_depth_mask_get()
{
GPUState &state = Context::get()->state_manager->state;
return (state.write_mask & GPU_WRITE_DEPTH) != 0;
}
-bool GPU_mipmap_enabled(void)
+bool GPU_mipmap_enabled()
{
/* TODO(fclem): this used to be a userdef option. */
return true;
@@ -303,17 +303,17 @@ bool GPU_mipmap_enabled(void)
/** \name Context Utils
* \{ */
-void GPU_flush(void)
+void GPU_flush()
{
Context::get()->flush();
}
-void GPU_finish(void)
+void GPU_finish()
{
Context::get()->finish();
}
-void GPU_apply_state(void)
+void GPU_apply_state()
{
Context::get()->state_manager->apply_state();
}
@@ -328,7 +328,7 @@ void GPU_apply_state(void)
* bgl functions.
* \{ */
-void GPU_bgl_start(void)
+void GPU_bgl_start()
{
Context *ctx = Context::get();
if (!(ctx && ctx->state_manager)) {
@@ -345,7 +345,7 @@ void GPU_bgl_start(void)
}
/* Just turn off the bgl safeguard system. Can be called even without GPU_bgl_start. */
-void GPU_bgl_end(void)
+void GPU_bgl_end()
{
Context *ctx = Context::get();
if (!(ctx && ctx->state_manager)) {
@@ -359,7 +359,7 @@ void GPU_bgl_end(void)
}
}
-bool GPU_bgl_get(void)
+bool GPU_bgl_get()
{
return Context::get()->state_manager->use_bgl;
}
@@ -381,7 +381,7 @@ void GPU_memory_barrier(eGPUBarrier barrier)
/** \name Default State
* \{ */
-StateManager::StateManager(void)
+StateManager::StateManager()
{
/* Set default state. */
state.write_mask = GPU_WRITE_COLOR;
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc
index 29fa8a89d27..be66d91b025 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer.cc
+++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc
@@ -66,13 +66,13 @@ void VertBuf::init(const GPUVertFormat *format, GPUUsageType usage)
flag |= GPU_VERTBUF_INIT;
}
-void VertBuf::clear(void)
+void VertBuf::clear()
{
this->release_data();
flag = GPU_VERTBUF_INVALID;
}
-VertBuf *VertBuf::duplicate(void)
+VertBuf *VertBuf::duplicate()
{
VertBuf *dst = GPUBackend::get()->vertbuf_alloc();
/* Full copy. */
@@ -107,7 +107,7 @@ void VertBuf::resize(uint vert_len)
flag |= GPU_VERTBUF_DATA_DIRTY;
}
-void VertBuf::upload(void)
+void VertBuf::upload()
{
this->upload_data();
}
@@ -125,7 +125,7 @@ using namespace blender::gpu;
/* -------- Creation & deletion -------- */
-GPUVertBuf *GPU_vertbuf_calloc(void)
+GPUVertBuf *GPU_vertbuf_calloc()
{
return wrap(GPUBackend::get()->vertbuf_alloc());
}
@@ -313,7 +313,7 @@ GPUVertBufStatus GPU_vertbuf_get_status(const GPUVertBuf *verts)
return unwrap(verts)->flag;
}
-uint GPU_vertbuf_get_memory_usage(void)
+uint GPU_vertbuf_get_memory_usage()
{
return VertBuf::memory_usage;
}
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc
index 46e048d7f7c..b444bd1859d 100644
--- a/source/blender/gpu/opengl/gl_backend.cc
+++ b/source/blender/gpu/opengl/gl_backend.cc
@@ -38,7 +38,7 @@ namespace blender::gpu {
/** \name Platform
* \{ */
-void GLBackend::platform_init(void)
+void GLBackend::platform_init()
{
BLI_assert(!GPG.initialized);
GPG.initialized = true;
@@ -135,7 +135,7 @@ void GLBackend::platform_init(void)
GPG.create_gpu_name(vendor, renderer, version);
}
-void GLBackend::platform_exit(void)
+void GLBackend::platform_exit()
{
BLI_assert(GPG.initialized);
GPG.clear();
@@ -147,7 +147,7 @@ void GLBackend::platform_exit(void)
/** \name Capabilities
* \{ */
-static bool detect_mip_render_workaround(void)
+static bool detect_mip_render_workaround()
{
int cube_size = 2;
float clear_color[4] = {1.0f, 0.5f, 0.0f, 0.0f};
@@ -192,7 +192,7 @@ static bool detect_mip_render_workaround(void)
return enable_workaround;
}
-static void detect_workarounds(void)
+static void detect_workarounds()
{
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
@@ -376,7 +376,7 @@ bool GLContext::debug_layer_workaround = false;
bool GLContext::unused_fb_slot_workaround = false;
float GLContext::derivative_signs[2] = {1.0f, 1.0f};
-void GLBackend::capabilities_init(void)
+void GLBackend::capabilities_init()
{
BLI_assert(GLEW_VERSION_3_3);
/* Common Capabilities. */
diff --git a/source/blender/gpu/opengl/gl_batch.cc b/source/blender/gpu/opengl/gl_batch.cc
index 6f36f128d18..b81c2d69122 100644
--- a/source/blender/gpu/opengl/gl_batch.cc
+++ b/source/blender/gpu/opengl/gl_batch.cc
@@ -50,7 +50,7 @@ using namespace blender::gpu;
* TODO(fclem): Could be revisited to avoid so much cross references.
* \{ */
-GLVaoCache::GLVaoCache(void)
+GLVaoCache::GLVaoCache()
{
init();
}
@@ -60,7 +60,7 @@ GLVaoCache::~GLVaoCache()
this->clear();
}
-void GLVaoCache::init(void)
+void GLVaoCache::init()
{
context_ = NULL;
interface_ = NULL;
@@ -149,7 +149,7 @@ void GLVaoCache::remove(const GLShaderInterface *interface)
}
}
-void GLVaoCache::clear(void)
+void GLVaoCache::clear()
{
GLContext *ctx = GLContext::get();
const int count = (is_dynamic_vao_count) ? dynamic_vaos.count : GPU_VAO_STATIC_LEN;
@@ -207,7 +207,7 @@ GLuint GLVaoCache::lookup(const GLShaderInterface *interface)
/* The GLVaoCache object is only valid for one GLContext.
* Reset the cache if trying to draw in another context; */
-void GLVaoCache::context_check(void)
+void GLVaoCache::context_check()
{
GLContext *ctx = GLContext::get();
BLI_assert(ctx);
@@ -282,7 +282,7 @@ GLuint GLVaoCache::vao_get(GPUBatch *batch)
/** \name Creation & Deletion
* \{ */
-GLBatch::GLBatch(void)
+GLBatch::GLBatch()
{
}
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index 9c98953f469..d766e6f0828 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -121,7 +121,7 @@ GLContext::~GLContext()
/** \name Activate / Deactivate context
* \{ */
-void GLContext::activate(void)
+void GLContext::activate()
{
/* Make sure no other context is already bound to this thread. */
BLI_assert(is_active_ == false);
@@ -160,7 +160,7 @@ void GLContext::activate(void)
immActivate();
}
-void GLContext::deactivate(void)
+void GLContext::deactivate()
{
immDeactivate();
is_active_ = false;
@@ -172,12 +172,12 @@ void GLContext::deactivate(void)
/** \name Flush, Finish & sync
* \{ */
-void GLContext::flush(void)
+void GLContext::flush()
{
glFlush();
}
-void GLContext::finish(void)
+void GLContext::finish()
{
glFinish();
}
@@ -191,7 +191,7 @@ void GLContext::finish(void)
* In this case we delay the deletion until the context is bound again.
* \{ */
-void GLSharedOrphanLists::orphans_clear(void)
+void GLSharedOrphanLists::orphans_clear()
{
/* Check if any context is active on this thread! */
BLI_assert(GLContext::get());
@@ -208,7 +208,7 @@ void GLSharedOrphanLists::orphans_clear(void)
lists_mutex.unlock();
};
-void GLContext::orphans_clear(void)
+void GLContext::orphans_clear()
{
/* Check if context has been activated by another thread! */
BLI_assert(this->is_active_on_thread());
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 5564cbbabae..3737321ed90 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -141,7 +141,7 @@ static void APIENTRY debug_callback(GLenum UNUSED(source),
#undef APIENTRY
/* This function needs to be called once per context. */
-void init_gl_callbacks(void)
+void init_gl_callbacks()
{
CLOG_ENSURE(&LOG);
@@ -369,7 +369,7 @@ void GLContext::debug_group_begin(const char *name, int index)
}
}
-void GLContext::debug_group_end(void)
+void GLContext::debug_group_end()
{
if ((G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) {
glPopDebugGroup();
diff --git a/source/blender/gpu/opengl/gl_debug_layer.cc b/source/blender/gpu/opengl/gl_debug_layer.cc
index a4dc4679b7e..188083b0f50 100644
--- a/source/blender/gpu/opengl/gl_debug_layer.cc
+++ b/source/blender/gpu/opengl/gl_debug_layer.cc
@@ -108,7 +108,7 @@ DEBUG_FUNC_DECLARE(PFNGLUSEPROGRAMPROC, void, glUseProgram, GLuint, program);
/* Init a fallback layer (to KHR_debug) that covers only some functions.
* We override the functions pointers by our own implementation that just checks glGetError.
* Some additional functions (not overridable) are covered inside the header using wrappers. */
-void init_debug_layer(void)
+void init_debug_layer()
{
#define DEBUG_WRAP(function) \
do { \
diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc
index 990e1a8014b..b0a8af5b482 100644
--- a/source/blender/gpu/opengl/gl_drawlist.cc
+++ b/source/blender/gpu/opengl/gl_drawlist.cc
@@ -88,7 +88,7 @@ GLDrawList::~GLDrawList()
GLContext::buf_free(buffer_id_);
}
-void GLDrawList::init(void)
+void GLDrawList::init()
{
BLI_assert(GLContext::get());
BLI_assert(MDI_ENABLED);
@@ -169,7 +169,7 @@ void GLDrawList::append(GPUBatch *gpu_batch, int i_first, int i_count)
}
}
-void GLDrawList::submit(void)
+void GLDrawList::submit()
{
if (command_len_ == 0) {
return;
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index a180aa270b0..661b976771f 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -92,7 +92,7 @@ GLFrameBuffer::~GLFrameBuffer()
}
}
-void GLFrameBuffer::init(void)
+void GLFrameBuffer::init()
{
context_ = GLContext::get();
state_manager_ = static_cast<GLStateManager *>(context_->state_manager);
@@ -154,7 +154,7 @@ bool GLFrameBuffer::check(char err_out[256])
return false;
}
-void GLFrameBuffer::update_attachments(void)
+void GLFrameBuffer::update_attachments()
{
/* Default frame-buffers cannot have attachments. */
BLI_assert(immutable_ == false);
@@ -236,7 +236,7 @@ void GLFrameBuffer::update_attachments(void)
}
}
-void GLFrameBuffer::apply_state(void)
+void GLFrameBuffer::apply_state()
{
if (dirty_state_ == false) {
return;
diff --git a/source/blender/gpu/opengl/gl_immediate.cc b/source/blender/gpu/opengl/gl_immediate.cc
index b71f8766dbb..4350902de73 100644
--- a/source/blender/gpu/opengl/gl_immediate.cc
+++ b/source/blender/gpu/opengl/gl_immediate.cc
@@ -135,7 +135,7 @@ uchar *GLImmediate::begin()
return (uchar *)data;
}
-void GLImmediate::end(void)
+void GLImmediate::end()
{
BLI_assert(prim_type != GPU_PRIM_NONE); /* make sure we're between a Begin/End pair */
diff --git a/source/blender/gpu/opengl/gl_index_buffer.cc b/source/blender/gpu/opengl/gl_index_buffer.cc
index 0096a9a500f..e2c18c5d0b9 100644
--- a/source/blender/gpu/opengl/gl_index_buffer.cc
+++ b/source/blender/gpu/opengl/gl_index_buffer.cc
@@ -33,7 +33,7 @@ GLIndexBuf::~GLIndexBuf()
GLContext::buf_free(ibo_id_);
}
-void GLIndexBuf::bind(void)
+void GLIndexBuf::bind()
{
if (is_subrange_) {
static_cast<GLIndexBuf *>(src_)->bind();
diff --git a/source/blender/gpu/opengl/gl_query.cc b/source/blender/gpu/opengl/gl_query.cc
index 6da5cacfcb2..8a42719c665 100644
--- a/source/blender/gpu/opengl/gl_query.cc
+++ b/source/blender/gpu/opengl/gl_query.cc
@@ -48,7 +48,7 @@ void GLQueryPool::reset(GPUQueryType type)
}
#endif
-void GLQueryPool::begin_query(void)
+void GLQueryPool::begin_query()
{
/* TODO add assert about expected usage. */
while (query_issued_ >= query_ids_.size()) {
@@ -59,7 +59,7 @@ void GLQueryPool::begin_query(void)
glBeginQuery(gl_type_, query_ids_[query_issued_++]);
}
-void GLQueryPool::end_query(void)
+void GLQueryPool::end_query()
{
/* TODO add assert about expected usage. */
glEndQuery(gl_type_);
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index 193e4ee8a70..57b9cac3f83 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -53,7 +53,7 @@ GLShader::GLShader(const char *name) : Shader(name)
debug::object_label(GL_PROGRAM, shader_program_, name);
}
-GLShader::~GLShader(void)
+GLShader::~GLShader()
{
#if 0 /* Would be nice to have, but for now the Deferred compilation \
* does not have a GPUContext. */
@@ -72,7 +72,7 @@ GLShader::~GLShader(void)
/** \name Shader stage creation
* \{ */
-char *GLShader::glsl_patch_get(void)
+char *GLShader::glsl_patch_get()
{
/** Used for shader patching. Init once. */
static char patch[512] = "\0";
@@ -172,7 +172,7 @@ void GLShader::fragment_shader_from_glsl(MutableSpan<const char *> sources)
frag_shader_ = this->create_shader_stage(GL_FRAGMENT_SHADER, sources);
}
-bool GLShader::finalize(void)
+bool GLShader::finalize()
{
if (compilation_failed_) {
return false;
@@ -201,13 +201,13 @@ bool GLShader::finalize(void)
/** \name Binding
* \{ */
-void GLShader::bind(void)
+void GLShader::bind()
{
BLI_assert(shader_program_ != 0);
glUseProgram(shader_program_);
}
-void GLShader::unbind(void)
+void GLShader::unbind()
{
#ifndef NDEBUG
glUseProgram(0);
@@ -259,7 +259,7 @@ bool GLShader::transform_feedback_enable(GPUVertBuf *buf_)
return true;
}
-void GLShader::transform_feedback_disable(void)
+void GLShader::transform_feedback_disable()
{
glEndTransformFeedback();
}
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index 8f2e0e2a72d..c5b5dd3efd2 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -42,7 +42,7 @@ namespace blender::gpu {
/** \name GLStateManager
* \{ */
-GLStateManager::GLStateManager(void)
+GLStateManager::GLStateManager()
{
/* Set other states that never change. */
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
@@ -71,7 +71,7 @@ GLStateManager::GLStateManager(void)
set_mutable_state(mutable_state);
}
-void GLStateManager::apply_state(void)
+void GLStateManager::apply_state()
{
if (!this->use_bgl) {
this->set_state(this->state);
@@ -84,7 +84,7 @@ void GLStateManager::apply_state(void)
};
/* Will set all the states regardless of the current ones. */
-void GLStateManager::force_state(void)
+void GLStateManager::force_state()
{
/* Little exception for clip distances since they need to keep the old count correct. */
uint32_t clip_distances = current_.clip_distances;
@@ -511,7 +511,7 @@ void GLStateManager::texture_unbind(Texture *tex_)
tex->is_bound_ = false;
}
-void GLStateManager::texture_unbind_all(void)
+void GLStateManager::texture_unbind_all()
{
for (int i = 0; i < ARRAY_SIZE(textures_); i++) {
if (textures_[i] != 0) {
@@ -523,7 +523,7 @@ void GLStateManager::texture_unbind_all(void)
this->texture_bind_apply();
}
-void GLStateManager::texture_bind_apply(void)
+void GLStateManager::texture_bind_apply()
{
if (dirty_texture_binds_ == 0) {
return;
@@ -555,7 +555,7 @@ void GLStateManager::texture_unpack_row_length_set(uint len)
glPixelStorei(GL_UNPACK_ROW_LENGTH, len);
}
-uint64_t GLStateManager::bound_texture_slots(void)
+uint64_t GLStateManager::bound_texture_slots()
{
uint64_t bound_slots = 0;
for (int i = 0; i < ARRAY_SIZE(textures_); i++) {
@@ -603,7 +603,7 @@ void GLStateManager::image_unbind(Texture *tex_)
tex->is_bound_ = false;
}
-void GLStateManager::image_unbind_all(void)
+void GLStateManager::image_unbind_all()
{
for (int i = 0; i < ARRAY_SIZE(images_); i++) {
if (images_[i] != 0) {
@@ -614,7 +614,7 @@ void GLStateManager::image_unbind_all(void)
this->image_bind_apply();
}
-void GLStateManager::image_bind_apply(void)
+void GLStateManager::image_bind_apply()
{
if (dirty_image_binds_ == 0) {
return;
@@ -638,7 +638,7 @@ void GLStateManager::image_bind_apply(void)
}
}
-uint8_t GLStateManager::bound_image_slots(void)
+uint8_t GLStateManager::bound_image_slots()
{
uint8_t bound_slots = 0;
for (int i = 0; i < ARRAY_SIZE(images_); i++) {
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index 070a86509ff..993bb56612c 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -63,7 +63,7 @@ GLTexture::~GLTexture()
}
/* Return true on success. */
-bool GLTexture::init_internal(void)
+bool GLTexture::init_internal()
{
if ((format_ == GPU_DEPTH24_STENCIL8) && GPU_depth_blitting_workaround()) {
/* MacOS + Radeon Pro fails to blit depth on GPU_DEPTH24_STENCIL8
@@ -294,7 +294,7 @@ void GLTexture::update_sub(
* WARNING: Depth textures are not populated but they have their mips correctly defined.
* WARNING: This resets the mipmap range.
*/
-void GLTexture::generate_mipmap(void)
+void GLTexture::generate_mipmap()
{
this->ensure_mipmaps(9999);
/* Some drivers have bugs when using glGenerateMipmap with depth textures (see T56789).
@@ -440,7 +440,7 @@ void GLTexture::mip_range_set(int min, int max)
}
}
-struct GPUFrameBuffer *GLTexture::framebuffer_get(void)
+struct GPUFrameBuffer *GLTexture::framebuffer_get()
{
if (framebuffer_) {
return framebuffer_;
@@ -461,7 +461,7 @@ struct GPUFrameBuffer *GLTexture::framebuffer_get(void)
GLuint GLTexture::samplers_[GPU_SAMPLER_MAX] = {0};
-void GLTexture::samplers_init(void)
+void GLTexture::samplers_init()
{
glGenSamplers(GPU_SAMPLER_MAX, samplers_);
for (int i = 0; i <= GPU_SAMPLER_ICON - 1; i++) {
@@ -517,7 +517,7 @@ void GLTexture::samplers_init(void)
debug::object_label(GL_SAMPLER, icon_sampler, "icons");
}
-void GLTexture::samplers_update(void)
+void GLTexture::samplers_update()
{
if (!GLContext::texture_filter_anisotropic_support) {
return;
@@ -536,7 +536,7 @@ void GLTexture::samplers_update(void)
}
}
-void GLTexture::samplers_free(void)
+void GLTexture::samplers_free()
{
glDeleteSamplers(GPU_SAMPLER_MAX, samplers_);
}
@@ -649,7 +649,7 @@ bool GLTexture::proxy_check(int mip)
/** \} */
-void GLTexture::check_feedback_loop(void)
+void GLTexture::check_feedback_loop()
{
/* Recursive down sample workaround break this check.
* See #recursive_downsample() for more information. */
@@ -679,7 +679,7 @@ void GLTexture::check_feedback_loop(void)
}
/* TODO(fclem): Legacy. Should be removed at some point. */
-uint GLTexture::gl_bindcode_get(void) const
+uint GLTexture::gl_bindcode_get() const
{
return tex_id_;
}
diff --git a/source/blender/gpu/opengl/gl_uniform_buffer.cc b/source/blender/gpu/opengl/gl_uniform_buffer.cc
index e6aaddf75d3..7f404880092 100644
--- a/source/blender/gpu/opengl/gl_uniform_buffer.cc
+++ b/source/blender/gpu/opengl/gl_uniform_buffer.cc
@@ -55,7 +55,7 @@ GLUniformBuf::~GLUniformBuf()
/** \name Data upload / update
* \{ */
-void GLUniformBuf::init(void)
+void GLUniformBuf::init()
{
BLI_assert(GLContext::get());
@@ -111,7 +111,7 @@ void GLUniformBuf::bind(int slot)
#endif
}
-void GLUniformBuf::unbind(void)
+void GLUniformBuf::unbind()
{
#ifdef DEBUG
/* NOTE: This only unbinds the last bound slot. */
diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.cc b/source/blender/gpu/opengl/gl_vertex_buffer.cc
index c6efe577e15..74640162a0b 100644
--- a/source/blender/gpu/opengl/gl_vertex_buffer.cc
+++ b/source/blender/gpu/opengl/gl_vertex_buffer.cc
@@ -27,19 +27,19 @@
namespace blender::gpu {
-void GLVertBuf::acquire_data(void)
+void GLVertBuf::acquire_data()
{
/* Discard previous data if any. */
MEM_SAFE_FREE(data);
data = (uchar *)MEM_mallocN(sizeof(uchar) * this->size_alloc_get(), __func__);
}
-void GLVertBuf::resize_data(void)
+void GLVertBuf::resize_data()
{
data = (uchar *)MEM_reallocN(data, sizeof(uchar) * this->size_alloc_get());
}
-void GLVertBuf::release_data(void)
+void GLVertBuf::release_data()
{
if (vbo_id_ != 0) {
GLContext::buf_free(vbo_id_);
@@ -75,12 +75,12 @@ void GLVertBuf::duplicate_data(VertBuf *dst_)
}
}
-void GLVertBuf::upload_data(void)
+void GLVertBuf::upload_data()
{
this->bind();
}
-void GLVertBuf::bind(void)
+void GLVertBuf::bind()
{
BLI_assert(GLContext::get() != NULL);
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index 12fc04e2142..dc2b46e5cea 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -59,7 +59,7 @@ struct ExportJobData {
bool export_ok;
};
-static void ensure_usd_plugin_path_registered(void)
+static void ensure_usd_plugin_path_registered()
{
static bool plugin_path_registered = false;
if (plugin_path_registered) {
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc
index 116177a54b7..16896470a6d 100644
--- a/source/blender/nodes/intern/node_socket.cc
+++ b/source/blender/nodes/intern/node_socket.cc
@@ -520,7 +520,7 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype)
extern "C" void ED_init_node_socket_type_virtual(bNodeSocketType *);
-static bNodeSocketType *make_socket_type_virtual(void)
+static bNodeSocketType *make_socket_type_virtual()
{
const char *socket_idname = "NodeSocketVirtual";
bNodeSocketType *stype;