diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-12-04 14:46:43 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-12-04 14:46:43 +0300 |
commit | 7f2d356a672d838c90cf47e9ff4006b15c104148 (patch) | |
tree | a87f8056750bc810f1430d03c14e8c93e170f3fd /source/blender/blenlib | |
parent | 10a8286a267d1796983f321dd01668d6072570ed (diff) |
Cleanup: Clang-Tidy, modernize-use-using
Replace `typedef` with `using` in C++ code.
In the case of `typedef struct SomeName { ... } SomeName;` I removed the
`typedef` altogether, as this is unnecessary in C++. Such cases have been
rewritten to `struct SomeName { ... };`
No functional changes.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/threads.cc | 4 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_array_store_test.cc | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc index 0586c361350..0b88cf53442 100644 --- a/source/blender/blenlib/intern/threads.cc +++ b/source/blender/blenlib/intern/threads.cc @@ -132,13 +132,13 @@ static int num_threads_override = 0; /* just a max for security reasons */ #define RE_MAX_THREAD BLENDER_MAX_THREADS -typedef struct ThreadSlot { +struct ThreadSlot { struct ThreadSlot *next, *prev; void *(*do_thread)(void *); void *callerdata; pthread_t pthread; int avail; -} ThreadSlot; +}; void BLI_threadapi_init(void) { diff --git a/source/blender/blenlib/tests/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc index ff050ce24db..8bbd109fb81 100644 --- a/source/blender/blenlib/tests/BLI_array_store_test.cc +++ b/source/blender/blenlib/tests/BLI_array_store_test.cc @@ -32,11 +32,11 @@ static void print_mem_saved(const char *id, const BArrayStore *bs) /* -------------------------------------------------------------------- */ /* Test Chunks (building data from list of chunks) */ -typedef struct TestChunk { +struct TestChunk { struct TestChunk *next, *prev; const void *data; size_t data_len; -} TestChunk; +}; static TestChunk *testchunk_list_add(ListBase *lb, const void *data, size_t data_len) { @@ -111,14 +111,14 @@ static char *testchunk_as_data_array(TestChunk **tc_array, int tc_array_len, siz /* Test Buffer */ /* API to handle local allocation of data so we can compare it with the data in the array_store */ -typedef struct TestBuffer { +struct TestBuffer { struct TestBuffer *next, *prev; const void *data; size_t data_len; /* for reference */ BArrayState *state; -} TestBuffer; +}; static TestBuffer *testbuffer_list_add(ListBase *lb, const void *data, size_t data_len) { |