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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-12-08 08:31:20 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-12-08 08:31:20 +0300
commitc1279768a77d093e1747f4954c9c0a959feefdf0 (patch)
tree1def9c880322764b4fe090677dfb66cab0c380d9 /source/blender/blenlib
parentcbcd74de226778a9da980c8c6081793452dd5cbc (diff)
Cleanup: Clang-Tidy modernize-redundant-void-arg
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc4
-rw-r--r--source/blender/blenlib/intern/rand.cc2
-rw-r--r--source/blender/blenlib/intern/threads.cc31
-rw-r--r--source/blender/blenlib/intern/uuid.cc2
4 files changed, 18 insertions, 21 deletions
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index a09276a1abb..1af4dfb029d 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -3195,7 +3195,7 @@ struct PerfCounts {
static PerfCounts *perfdata = nullptr;
-static void perfdata_init(void)
+static void perfdata_init()
{
perfdata = new PerfCounts;
@@ -3247,7 +3247,7 @@ static void doperfmax(int maxnum, int val)
perfdata->max[maxnum] = max_ii(perfdata->max[maxnum], val);
}
-static void dump_perfdata(void)
+static void dump_perfdata()
{
std::cout << "\nPERFDATA\n";
for (int i : perfdata->count.index_range()) {
diff --git a/source/blender/blenlib/intern/rand.cc b/source/blender/blenlib/intern/rand.cc
index db5e08d37ce..606d2611112 100644
--- a/source/blender/blenlib/intern/rand.cc
+++ b/source/blender/blenlib/intern/rand.cc
@@ -272,7 +272,7 @@ struct RNG_THREAD_ARRAY {
RNG rng_tab[BLENDER_MAX_THREADS];
};
-RNG_THREAD_ARRAY *BLI_rng_threaded_new(void)
+RNG_THREAD_ARRAY *BLI_rng_threaded_new()
{
unsigned int i;
RNG_THREAD_ARRAY *rngarr = (RNG_THREAD_ARRAY *)MEM_mallocN(sizeof(RNG_THREAD_ARRAY),
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc
index 35097013439..15bdb08f89f 100644
--- a/source/blender/blenlib/intern/threads.cc
+++ b/source/blender/blenlib/intern/threads.cc
@@ -140,7 +140,7 @@ struct ThreadSlot {
int avail;
};
-void BLI_threadapi_init(void)
+void BLI_threadapi_init()
{
mainid = pthread_self();
if (numaAPI_Initialize() == NUMAAPI_SUCCESS) {
@@ -148,7 +148,7 @@ void BLI_threadapi_init(void)
}
}
-void BLI_threadapi_exit(void)
+void BLI_threadapi_exit()
{
}
@@ -231,7 +231,7 @@ static void *tslot_thread_start(void *tslot_p)
return tslot->do_thread(tslot->callerdata);
}
-int BLI_thread_is_main(void)
+int BLI_thread_is_main()
{
return pthread_equal(pthread_self(), mainid);
}
@@ -306,7 +306,7 @@ void BLI_threadpool_end(ListBase *threadbase)
/* System Information */
/* how many threads are native on this system? */
-int BLI_system_thread_count(void)
+int BLI_system_thread_count()
{
static int t = -1;
@@ -347,7 +347,7 @@ void BLI_system_num_threads_override_set(int num)
num_threads_override = num;
}
-int BLI_system_num_threads_override_get(void)
+int BLI_system_num_threads_override_get()
{
return num_threads_override;
}
@@ -418,7 +418,7 @@ void BLI_mutex_end(ThreadMutex *mutex)
pthread_mutex_destroy(mutex);
}
-ThreadMutex *BLI_mutex_alloc(void)
+ThreadMutex *BLI_mutex_alloc()
{
ThreadMutex *mutex = static_cast<ThreadMutex *>(MEM_callocN(sizeof(ThreadMutex), "ThreadMutex"));
BLI_mutex_init(mutex);
@@ -533,7 +533,7 @@ void BLI_rw_mutex_end(ThreadRWMutex *mutex)
pthread_rwlock_destroy(mutex);
}
-ThreadRWMutex *BLI_rw_mutex_alloc(void)
+ThreadRWMutex *BLI_rw_mutex_alloc()
{
ThreadRWMutex *mutex = static_cast<ThreadRWMutex *>(
MEM_callocN(sizeof(ThreadRWMutex), "ThreadRWMutex"));
@@ -555,7 +555,7 @@ struct TicketMutex {
unsigned int queue_head, queue_tail;
};
-TicketMutex *BLI_ticket_mutex_alloc(void)
+TicketMutex *BLI_ticket_mutex_alloc()
{
TicketMutex *ticket = static_cast<TicketMutex *>(
MEM_callocN(sizeof(TicketMutex), "TicketMutex"));
@@ -640,7 +640,7 @@ struct ThreadQueue {
volatile int canceled;
};
-ThreadQueue *BLI_thread_queue_init(void)
+ThreadQueue *BLI_thread_queue_init()
{
ThreadQueue *queue;
@@ -818,8 +818,7 @@ void BLI_thread_queue_wait_finish(ThreadQueue *queue)
/* **** Special functions to help performance on crazy NUMA setups. **** */
#if 0 /* UNUSED */
-static bool check_is_threadripper2_alike_topology(void)
-{
+static bool check_is_threadripper2_alike_topology(){
/* NOTE: We hope operating system does not support CPU hot-swap to
* a different brand. And that SMP of different types is also not
* encouraged by the system. */
@@ -860,8 +859,7 @@ static bool check_is_threadripper2_alike_topology(void)
return is_threadripper2;
}
-static void threadripper_put_process_on_fast_node(void)
-{
+static void threadripper_put_process_on_fast_node(){
if (!is_numa_available) {
return;
}
@@ -880,8 +878,7 @@ static void threadripper_put_process_on_fast_node(void)
numaAPI_RunProcessOnNode(0);
}
-static void threadripper_put_thread_on_fast_node(void)
-{
+static void threadripper_put_thread_on_fast_node(){
if (!is_numa_available) {
return;
}
@@ -899,7 +896,7 @@ static void threadripper_put_thread_on_fast_node(void)
}
#endif /* UNUSED */
-void BLI_thread_put_process_on_fast_node(void)
+void BLI_thread_put_process_on_fast_node()
{
/* Disabled for now since this causes only 16 threads to be used on a
* thread-ripper for computations like sculpting and fluid sim. The problem
@@ -915,7 +912,7 @@ void BLI_thread_put_process_on_fast_node(void)
#endif
}
-void BLI_thread_put_thread_on_fast_node(void)
+void BLI_thread_put_thread_on_fast_node()
{
/* Disabled for now, see comment above. */
#if 0
diff --git a/source/blender/blenlib/intern/uuid.cc b/source/blender/blenlib/intern/uuid.cc
index de4602bf3ed..e2578ffa7c7 100644
--- a/source/blender/blenlib/intern/uuid.cc
+++ b/source/blender/blenlib/intern/uuid.cc
@@ -81,7 +81,7 @@ bUUID BLI_uuid_generate_random()
return uuid;
}
-bUUID BLI_uuid_nil(void)
+bUUID BLI_uuid_nil()
{
const bUUID nil = {0, 0, 0, 0, 0, {0}};
return nil;