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:
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/BLI_filelist.c4
-rw-r--r--source/blender/blenlib/intern/fileops.c2
-rw-r--r--source/blender/blenlib/intern/hash_md5.c4
-rw-r--r--source/blender/blenlib/intern/list_sort_impl.h4
-rw-r--r--source/blender/blenlib/intern/math_interp.c4
-rw-r--r--source/blender/blenlib/intern/path_util.c8
-rw-r--r--source/blender/blenlib/intern/string.c2
-rw-r--r--source/blender/blenlib/intern/string_utf8.c10
-rw-r--r--source/blender/blenlib/intern/task.c16
9 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index c92505acb54..3c53d1eee1b 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -437,7 +437,7 @@ void BLI_filelist_duplicate(struct direntry **dest_filelist,
unsigned int i;
*dest_filelist = MEM_mallocN(sizeof(**dest_filelist) * (size_t)(nrentries), __func__);
- for (i = 0; i < nrentries; ++i) {
+ for (i = 0; i < nrentries; i++) {
struct direntry *const src = &src_filelist[i];
struct direntry *dst = &(*dest_filelist)[i];
BLI_filelist_entry_duplicate(dst, src);
@@ -463,7 +463,7 @@ void BLI_filelist_entry_free(struct direntry *entry)
void BLI_filelist_free(struct direntry *filelist, const unsigned int nrentries)
{
unsigned int i;
- for (i = 0; i < nrentries; ++i) {
+ for (i = 0; i < nrentries; i++) {
BLI_filelist_entry_free(&filelist[i]);
}
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 0e3987eefc9..c203c45bb93 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -343,7 +343,7 @@ static bool delete_recursive(const char *dir)
err = true;
}
}
- ++fl;
+ fl++;
}
if (!err && delete_unique(dir, true)) {
diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c
index 44a9348c5d3..f9e9b3bfbf9 100644
--- a/source/blender/blenlib/intern/hash_md5.c
+++ b/source/blender/blenlib/intern/hash_md5.c
@@ -151,7 +151,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
*/
#define OP(a, b, c, d, s, T) \
a += FF(b, c, d) + (*cwp++ = SWAP(*words)) + T; \
- ++words; \
+ words++; \
CYCLIC(a, s); \
a += b; \
(void)0
@@ -408,7 +408,7 @@ char *BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33])
char *q;
short len;
- for (q = r_hex_digest, p = (const unsigned char *)resblock, len = 0; len < 16; ++p, ++len) {
+ for (q = r_hex_digest, p = (const unsigned char *)resblock, len = 0; len < 16; p++, len++) {
const unsigned char c = *p;
*q++ = hex_map[c >> 4];
*q++ = hex_map[c & 15];
diff --git a/source/blender/blenlib/intern/list_sort_impl.h b/source/blender/blenlib/intern/list_sort_impl.h
index fac1ca8e983..458ace3a712 100644
--- a/source/blender/blenlib/intern/list_sort_impl.h
+++ b/source/blender/blenlib/intern/list_sort_impl.h
@@ -240,7 +240,7 @@ BLI_INLINE void insert_list(struct SortInfo *si, list_node *list, unsigned int r
rank = MAX_RANKS;
}
list = merge_lists(sweep_up(si, NULL, si->n_ranks), list, THUNK_APPEND1(si->func, si->thunk));
- for (i = si->n_ranks; i < rank; ++i) {
+ for (i = si->n_ranks; i < rank; i++) {
si->ranks[i] = NULL;
}
}
@@ -248,7 +248,7 @@ BLI_INLINE void insert_list(struct SortInfo *si, list_node *list, unsigned int r
if (rank) {
list = merge_lists(sweep_up(si, NULL, rank), list, THUNK_APPEND1(si->func, si->thunk));
}
- for (i = rank; i < si->n_ranks && si->ranks[i]; ++i) {
+ for (i = rank; i < si->n_ranks && si->ranks[i]; i++) {
list = merge_lists(si->ranks[i], list, THUNK_APPEND1(si->func, si->thunk));
si->ranks[i] = NULL;
}
diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c
index 14fde18aa52..6277b1cd9dc 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -687,11 +687,11 @@ void BLI_ewa_filter(const int width,
d = 0.0f;
zero_v4(result);
- for (v = v1; v <= v2; ++v) {
+ for (v = v1; v <= v2; v++) {
const float V = (float)v - V0;
float DQ = ac1 + B * V;
float Q = (C * V + BU) * V + ac2;
- for (u = u1; u <= u2; ++u) {
+ for (u = u1; u <= u2; u++) {
if (Q < (float)(EWA_MAXIDX + 1)) {
float tc[4];
const float wt = EWA_WTS[(Q < 0.0f) ? 0 : (unsigned int)Q];
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 18acbca00a1..725b6f8937a 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -618,14 +618,14 @@ void BLI_path_rel(char *file, const char *relfile)
*/
if (*q != '/') {
while ((q >= file) && (*q != '/')) {
- --q;
- --p;
+ q--;
+ p--;
}
}
else if (*p != '/') {
while ((p >= temp) && (*p != '/')) {
- --p;
- --q;
+ p--;
+ q--;
}
}
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 4059e0401c0..0b8ec44cbcd 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -978,7 +978,7 @@ size_t BLI_str_partition_ex(const char *str,
*sep = *suf = NULL;
- for (d = delim; *d != '\0'; ++d) {
+ for (d = delim; *d != '\0'; d++) {
const char *tmp;
if (end) {
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 22c23727d76..92c4ec73768 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -716,7 +716,7 @@ size_t BLI_str_utf8_from_unicode(uint c, char *outbuf)
}
if (outbuf) {
- for (i = len - 1; i > 0; --i) {
+ for (i = len - 1; i > 0; i--) {
outbuf[i] = (c & 0x3f) | 0x80;
c >>= 6;
}
@@ -744,7 +744,7 @@ size_t BLI_str_utf8_from_unicode(uint c, char *outbuf)
*/
char *BLI_str_find_prev_char_utf8(const char *str, const char *p)
{
- for (--p; p >= str; --p) {
+ for (--p; p >= str; p--) {
if ((*p & 0xc0) != 0x80) {
return (char *)p;
}
@@ -771,12 +771,12 @@ char *BLI_str_find_next_char_utf8(const char *p, const char *end)
{
if (*p) {
if (end) {
- for (++p; p < end && (*p & 0xc0) == 0x80; ++p) {
+ for (++p; p < end && (*p & 0xc0) == 0x80; p++) {
/* do nothing */
}
}
else {
- for (++p; (*p & 0xc0) == 0x80; ++p) {
+ for (++p; (*p & 0xc0) == 0x80; p++) {
/* do nothing */
}
}
@@ -852,7 +852,7 @@ size_t BLI_str_partition_ex_utf8(const char *str,
break;
}
- for (d = delim; *d != '\0'; ++d) {
+ for (d = delim; *d != '\0'; d++) {
if (*d == c) {
/* *suf is already correct in case from_right is true. */
if (!from_right) {
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index 7c5ccd7aeb6..2f6c88c128a 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -266,7 +266,7 @@ BLI_INLINE TaskThreadLocalStorage *get_task_tls(TaskPool *pool, const int thread
BLI_INLINE void free_task_tls(TaskThreadLocalStorage *tls)
{
TaskMemPool *task_mempool = &tls->task_mempool;
- for (int i = 0; i < task_mempool->num_tasks; ++i) {
+ for (int i = 0; i < task_mempool->num_tasks; i++) {
MEM_freeN(task_mempool->tasks[i]);
}
}
@@ -561,7 +561,7 @@ void BLI_task_scheduler_free(TaskScheduler *scheduler)
/* Delete task thread data */
if (scheduler->task_threads) {
- for (int i = 0; i < scheduler->num_threads + 1; ++i) {
+ for (int i = 0; i < scheduler->num_threads + 1; i++) {
TaskThreadLocalStorage *tls = &scheduler->task_threads[i].tls;
free_task_tls(tls);
}
@@ -777,7 +777,7 @@ void BLI_task_pool_free(TaskPool *pool)
#ifdef DEBUG_STATS
printf("Thread ID Allocated Reused Discarded\n");
- for (int i = 0; i < pool->scheduler->num_threads + 1; ++i) {
+ for (int i = 0; i < pool->scheduler->num_threads + 1; i++) {
printf("%02d %05d %05d %05d\n",
i,
pool->mempool_stats[i].num_alloc,
@@ -1116,7 +1116,7 @@ static void parallel_range_func(TaskPool *__restrict pool, void *userdata_chunk,
};
int iter, count;
while (parallel_range_next_iter_get(state, &iter, &count)) {
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < count; i++) {
state->func(state->userdata, iter + i, &tls);
}
}
@@ -1140,7 +1140,7 @@ static void parallel_range_single_thread(const int start,
.thread_id = 0,
.userdata_chunk = userdata_chunk_local,
};
- for (int i = start; i < stop; ++i) {
+ for (int i = start; i < stop; i++) {
func(userdata, i, &tls);
}
if (settings->func_finalize != NULL) {
@@ -1273,7 +1273,7 @@ BLI_INLINE Link *parallel_listbase_next_iter_get(ParallelListState *__restrict s
if (LIKELY(result != NULL)) {
*index = state->index;
while (state->link != NULL && task_count < state->chunk_size) {
- ++task_count;
+ task_count++;
state->link = state->link->next;
}
state->index += task_count;
@@ -1292,7 +1292,7 @@ static void parallel_listbase_func(TaskPool *__restrict pool,
int index, count;
while ((link = parallel_listbase_next_iter_get(state, &index, &count)) != NULL) {
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < count; i++) {
state->func(state->userdata, link, index + i);
link = link->next;
}
@@ -1304,7 +1304,7 @@ static void task_parallel_listbase_no_threads(struct ListBase *listbase,
TaskParallelListbaseFunc func)
{
int i = 0;
- for (Link *link = listbase->first; link != NULL; link = link->next, ++i) {
+ for (Link *link = listbase->first; link != NULL; link = link->next, i++) {
func(userdata, link, i);
}
}