From 9c8255d486c1271f20d33debf2a9e9ce883b5019 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Oct 2021 18:33:42 +1100 Subject: [PATCH] Cleanup: use 'e' prefix for enum types --- source/blender/blenkernel/BKE_main.h | 6 +++--- source/blender/blenkernel/BKE_report.h | 20 +++++++++---------- source/blender/blenkernel/BKE_undo_system.h | 18 ++++++++--------- source/blender/blenkernel/intern/main.c | 2 +- source/blender/blenkernel/intern/report.c | 20 +++++++++---------- .../blender/blenkernel/intern/undo_system.c | 14 ++++++------- source/blender/blenlib/BLI_task.h | 12 +++++------ source/blender/blenlib/intern/task_pool.cc | 14 ++++++------- source/blender/blenloader/BLO_read_write.h | 4 ++-- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/blenloader/intern/readfile.h | 2 +- source/blender/editors/mesh/editmesh_utils.c | 2 +- source/blender/editors/undo/ed_undo.c | 2 +- .../makesdna/DNA_windowmanager_types.h | 10 +++++----- source/blender/windowmanager/WM_api.h | 12 +++++------ .../windowmanager/intern/wm_event_system.c | 4 ++-- .../blender/windowmanager/intern/wm_window.c | 2 +- 17 files changed, 73 insertions(+), 73 deletions(-) diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 3108dfd5d8f..68b1b55f47f 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -90,12 +90,12 @@ typedef struct MainIDRelationsEntry { } MainIDRelationsEntry; /* MainIDRelationsEntry.tags */ -typedef enum MainIDRelationsEntryTags { +typedef enum eMainIDRelationsEntryTags { /* Generic tag marking the entry as to be processed. */ MAINIDRELATIONS_ENTRY_TAGS_DOIT = 1 << 0, /* Generic tag marking the entry as processed. */ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED = 1 << 1, -} MainIDRelationsEntryTags; +} eMainIDRelationsEntryTags; typedef struct MainIDRelations { /* Mapping from an ID pointer to all of its parents (IDs using it) and children (IDs it uses). @@ -209,7 +209,7 @@ void BKE_main_unlock(struct Main *bmain); void BKE_main_relations_create(struct Main *bmain, const short flag); void BKE_main_relations_free(struct Main *bmain); void BKE_main_relations_tag_set(struct Main *bmain, - const MainIDRelationsEntryTags tag, + const eMainIDRelationsEntryTags tag, const bool value); struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset); diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 5b22918e84c..ec2e8d0f875 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -40,27 +40,27 @@ extern "C" { void BKE_reports_init(ReportList *reports, int flag); void BKE_reports_clear(ReportList *reports); -void BKE_report(ReportList *reports, ReportType type, const char *message); -void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...) +void BKE_report(ReportList *reports, eReportType type, const char *message); +void BKE_reportf(ReportList *reports, eReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4); void BKE_reports_prepend(ReportList *reports, const char *prepend); void BKE_reports_prependf(ReportList *reports, const char *prepend, ...) ATTR_PRINTF_FORMAT(2, 3); -ReportType BKE_report_print_level(ReportList *reports); -void BKE_report_print_level_set(ReportList *reports, ReportType level); +eReportType BKE_report_print_level(ReportList *reports); +void BKE_report_print_level_set(ReportList *reports, eReportType level); -ReportType BKE_report_store_level(ReportList *reports); -void BKE_report_store_level_set(ReportList *reports, ReportType level); +eReportType BKE_report_store_level(ReportList *reports); +void BKE_report_store_level_set(ReportList *reports, eReportType level); -char *BKE_reports_string(ReportList *reports, ReportType level); -void BKE_reports_print(ReportList *reports, ReportType level); +char *BKE_reports_string(ReportList *reports, eReportType level); +void BKE_reports_print(ReportList *reports, eReportType level); Report *BKE_reports_last_displayable(ReportList *reports); -bool BKE_reports_contain(ReportList *reports, ReportType level); +bool BKE_reports_contain(ReportList *reports, eReportType level); -const char *BKE_report_type_str(ReportType type); +const char *BKE_report_type_str(eReportType type); bool BKE_report_write_file_fp(FILE *fp, ReportList *reports, const char *header); bool BKE_report_write_file(const char *filepath, ReportList *reports, const char *header); diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h index 2973a432723..2a90211f8e0 100644 --- a/source/blender/blenkernel/BKE_undo_system.h +++ b/source/blender/blenkernel/BKE_undo_system.h @@ -102,11 +102,11 @@ typedef enum eUndoStepDir { STEP_INVALID = 0, } eUndoStepDir; -typedef enum UndoPushReturn { +typedef enum eUndoPushReturn { UNDO_PUSH_RET_FAILURE = 0, UNDO_PUSH_RET_SUCCESS = (1 << 0), UNDO_PUSH_RET_OVERRIDE_CHANGED = (1 << 1), -} UndoPushReturn; +} eUndoPushReturn; typedef void (*UndoTypeForEachIDRefFn)(void *user_data, struct UndoRefID *id_ref); @@ -156,7 +156,7 @@ typedef struct UndoType { } UndoType; /** #UndoType.flag bitflags. */ -typedef enum UndoTypeFlags { +typedef enum eUndoTypeFlags { /** * This undo type `encode` callback needs a valid context, it will fail otherwise. * \note Callback is still supposed to properly deal with a NULL context pointer. @@ -169,7 +169,7 @@ typedef enum UndoTypeFlags { * This is typically used for undo systems that store both before/after states. */ UNDOTYPE_FLAG_DECODE_ACTIVE_STEP = 1 << 1, -} UndoTypeFlags; +} eUndoTypeFlags; /* Expose since we need to perform operations on specific undo types (rarely). */ extern const UndoType *BKE_UNDOSYS_TYPE_IMAGE; @@ -204,11 +204,11 @@ UndoStep *BKE_undosys_step_push_init_with_type(UndoStack *ustack, const UndoType *ut); UndoStep *BKE_undosys_step_push_init(UndoStack *ustack, struct bContext *C, const char *name); -UndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack, - struct bContext *C, - const char *name, - const UndoType *ut); -UndoPushReturn BKE_undosys_step_push(UndoStack *ustack, struct bContext *C, const char *name); +eUndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack, + struct bContext *C, + const char *name, + const UndoType *ut); +eUndoPushReturn BKE_undosys_step_push(UndoStack *ustack, struct bContext *C, const char *name); UndoStep *BKE_undosys_step_find_by_name_with_type(UndoStack *ustack, const char *name, diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c index 583feacc04b..a5de0bc99c8 100644 --- a/source/blender/blenkernel/intern/main.c +++ b/source/blender/blenkernel/intern/main.c @@ -328,7 +328,7 @@ void BKE_main_relations_free(Main *bmain) /** Set or clear given `tag` in all relation entries of given `bmain`. */ void BKE_main_relations_tag_set(struct Main *bmain, - const MainIDRelationsEntryTags tag, + const eMainIDRelationsEntryTags tag, const bool value) { if (bmain->relations == NULL) { diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index c877ec6b6b0..90e7ca3f11a 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -37,7 +37,7 @@ #include "BKE_global.h" /* G.background only */ #include "BKE_report.h" -const char *BKE_report_type_str(ReportType type) +const char *BKE_report_type_str(eReportType type) { switch (type) { case RPT_DEBUG: @@ -101,7 +101,7 @@ void BKE_reports_clear(ReportList *reports) BLI_listbase_clear(&reports->list); } -void BKE_report(ReportList *reports, ReportType type, const char *_message) +void BKE_report(ReportList *reports, eReportType type, const char *_message) { Report *report; int len; @@ -129,7 +129,7 @@ void BKE_report(ReportList *reports, ReportType type, const char *_message) } } -void BKE_reportf(ReportList *reports, ReportType type, const char *_format, ...) +void BKE_reportf(ReportList *reports, eReportType type, const char *_format, ...) { DynStr *ds; Report *report; @@ -215,7 +215,7 @@ void BKE_reports_prependf(ReportList *reports, const char *_prepend, ...) } } -ReportType BKE_report_print_level(ReportList *reports) +eReportType BKE_report_print_level(ReportList *reports) { if (!reports) { return RPT_ERROR; @@ -224,7 +224,7 @@ ReportType BKE_report_print_level(ReportList *reports) return reports->printlevel; } -void BKE_report_print_level_set(ReportList *reports, ReportType level) +void BKE_report_print_level_set(ReportList *reports, eReportType level) { if (!reports) { return; @@ -233,7 +233,7 @@ void BKE_report_print_level_set(ReportList *reports, ReportType level) reports->printlevel = level; } -ReportType BKE_report_store_level(ReportList *reports) +eReportType BKE_report_store_level(ReportList *reports) { if (!reports) { return RPT_ERROR; @@ -242,7 +242,7 @@ ReportType BKE_report_store_level(ReportList *reports) return reports->storelevel; } -void BKE_report_store_level_set(ReportList *reports, ReportType level) +void BKE_report_store_level_set(ReportList *reports, eReportType level) { if (!reports) { return; @@ -251,7 +251,7 @@ void BKE_report_store_level_set(ReportList *reports, ReportType level) reports->storelevel = level; } -char *BKE_reports_string(ReportList *reports, ReportType level) +char *BKE_reports_string(ReportList *reports, eReportType level) { Report *report; DynStr *ds; @@ -279,7 +279,7 @@ char *BKE_reports_string(ReportList *reports, ReportType level) return cstring; } -void BKE_reports_print(ReportList *reports, ReportType level) +void BKE_reports_print(ReportList *reports, eReportType level) { char *cstring = BKE_reports_string(reports, level); @@ -305,7 +305,7 @@ Report *BKE_reports_last_displayable(ReportList *reports) return NULL; } -bool BKE_reports_contain(ReportList *reports, ReportType level) +bool BKE_reports_contain(ReportList *reports, eReportType level) { Report *report; if (reports != NULL) { diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c index db5184edfd2..26d37489e35 100644 --- a/source/blender/blenkernel/intern/undo_system.c +++ b/source/blender/blenkernel/intern/undo_system.c @@ -346,7 +346,7 @@ static bool undosys_stack_push_main(UndoStack *ustack, const char *name, struct CLOG_INFO(&LOG, 1, "'%s'", name); bContext *C_temp = CTX_create(); CTX_data_main_set(C_temp, bmain); - UndoPushReturn ret = BKE_undosys_step_push_with_type( + eUndoPushReturn ret = BKE_undosys_step_push_with_type( ustack, C_temp, name, BKE_UNDOSYS_TYPE_MEMFILE); CTX_free(C_temp); return (ret & UNDO_PUSH_RET_SUCCESS); @@ -500,17 +500,17 @@ UndoStep *BKE_undosys_step_push_init(UndoStack *ustack, bContext *C, const char /** * \param C: Can be NULL from some callers if their encoding function doesn't need it */ -UndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack, - bContext *C, - const char *name, - const UndoType *ut) +eUndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack, + bContext *C, + const char *name, + const UndoType *ut) { BLI_assert((ut->flags & UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE) == 0 || C != NULL); UNDO_NESTED_ASSERT(false); undosys_stack_validate(ustack, false); bool is_not_empty = ustack->step_active != NULL; - UndoPushReturn retval = UNDO_PUSH_RET_FAILURE; + eUndoPushReturn retval = UNDO_PUSH_RET_FAILURE; /* Might not be final place for this to be called - probably only want to call it from some * undo handlers, not all of them? */ @@ -602,7 +602,7 @@ UndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack, return (retval | UNDO_PUSH_RET_SUCCESS); } -UndoPushReturn BKE_undosys_step_push(UndoStack *ustack, bContext *C, const char *name) +eUndoPushReturn BKE_undosys_step_push(UndoStack *ustack, bContext *C, const char *name) { UNDO_NESTED_ASSERT(false); const UndoType *ut = ustack->step_init ? ustack->step_init->type : diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 418db14e2f3..53ac5f7047b 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -62,10 +62,10 @@ int BLI_task_scheduler_num_threads(void); * be launched. */ -typedef enum TaskPriority { +typedef enum eTaskPriority { TASK_PRIORITY_LOW, TASK_PRIORITY_HIGH, -} TaskPriority; +} eTaskPriority; typedef struct TaskPool TaskPool; typedef void (*TaskRunFunction)(TaskPool *__restrict pool, void *taskdata); @@ -73,21 +73,21 @@ typedef void (*TaskFreeFunction)(TaskPool *__restrict pool, void *taskdata); /* Regular task pool that immediately starts executing tasks as soon as they * are pushed, either on the current or another thread. */ -TaskPool *BLI_task_pool_create(void *userdata, TaskPriority priority); +TaskPool *BLI_task_pool_create(void *userdata, eTaskPriority priority); /* Background: always run tasks in a background thread, never immediately * execute them. For running background jobs. */ -TaskPool *BLI_task_pool_create_background(void *userdata, TaskPriority priority); +TaskPool *BLI_task_pool_create_background(void *userdata, eTaskPriority priority); /* Background Serial: run tasks one after the other in the background, * without parallelization between the tasks. */ -TaskPool *BLI_task_pool_create_background_serial(void *userdata, TaskPriority priority); +TaskPool *BLI_task_pool_create_background_serial(void *userdata, eTaskPriority priority); /* Suspended: don't execute tasks until work_and_wait is called. This is slower * as threads can't immediately start working. But it can be used if the data * structures the threads operate on are not fully initialized until all tasks * are created. */ -TaskPool *BLI_task_pool_create_suspended(void *userdata, TaskPriority priority); +TaskPool *BLI_task_pool_create_suspended(void *userdata, eTaskPriority priority); /* No threads: immediately executes tasks on the same thread. For debugging. */ TaskPool *BLI_task_pool_create_no_threads(void *userdata); diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc index cbb5bf34477..1651d4c2205 100644 --- a/source/blender/blenlib/intern/task_pool.cc +++ b/source/blender/blenlib/intern/task_pool.cc @@ -121,7 +121,7 @@ class Task { #ifdef WITH_TBB class TBBTaskGroup : public tbb::task_group { public: - TBBTaskGroup(TaskPriority priority) + TBBTaskGroup(eTaskPriority priority) { # if TBB_INTERFACE_VERSION_MAJOR >= 12 /* TODO: support priorities in TBB 2021, where they are only available as @@ -186,7 +186,7 @@ void Task::operator()() const * Tasks may be suspended until in all are created, to make it possible to * initialize data structures and create tasks in a single pass. */ -static void tbb_task_pool_create(TaskPool *pool, TaskPriority priority) +static void tbb_task_pool_create(TaskPool *pool, eTaskPriority priority) { if (pool->type == TASK_POOL_TBB_SUSPENDED) { pool->is_suspended = true; @@ -363,7 +363,7 @@ static void background_task_pool_free(TaskPool *pool) /* Task Pool */ -static TaskPool *task_pool_create_ex(void *userdata, TaskPoolType type, TaskPriority priority) +static TaskPool *task_pool_create_ex(void *userdata, TaskPoolType type, eTaskPriority priority) { const bool use_threads = BLI_task_scheduler_num_threads() > 1 && type != TASK_POOL_NO_THREADS; @@ -401,7 +401,7 @@ static TaskPool *task_pool_create_ex(void *userdata, TaskPoolType type, TaskPrio /** * Create a normal task pool. Tasks will be executed as soon as they are added. */ -TaskPool *BLI_task_pool_create(void *userdata, TaskPriority priority) +TaskPool *BLI_task_pool_create(void *userdata, eTaskPriority priority) { return task_pool_create_ex(userdata, TASK_POOL_TBB, priority); } @@ -418,7 +418,7 @@ TaskPool *BLI_task_pool_create(void *userdata, TaskPriority priority) * they could end never being executed, since the 'fallback' background thread is already * busy with parent task in single-threaded context). */ -TaskPool *BLI_task_pool_create_background(void *userdata, TaskPriority priority) +TaskPool *BLI_task_pool_create_background(void *userdata, eTaskPriority priority) { return task_pool_create_ex(userdata, TASK_POOL_BACKGROUND, priority); } @@ -428,7 +428,7 @@ TaskPool *BLI_task_pool_create_background(void *userdata, TaskPriority priority) * for until BLI_task_pool_work_and_wait() is called. This helps reducing threading * overhead when pushing huge amount of small initial tasks from the main thread. */ -TaskPool *BLI_task_pool_create_suspended(void *userdata, TaskPriority priority) +TaskPool *BLI_task_pool_create_suspended(void *userdata, eTaskPriority priority) { return task_pool_create_ex(userdata, TASK_POOL_TBB_SUSPENDED, priority); } @@ -446,7 +446,7 @@ TaskPool *BLI_task_pool_create_no_threads(void *userdata) * Task pool that executes one task after the other, possibly on different threads * but never in parallel. */ -TaskPool *BLI_task_pool_create_background_serial(void *userdata, TaskPriority priority) +TaskPool *BLI_task_pool_create_background_serial(void *userdata, eTaskPriority priority) { return task_pool_create_ex(userdata, TASK_POOL_BACKGROUND_SERIAL, priority); } diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.h index be5d28c7716..ca7ea6d8f09 100644 --- a/source/blender/blenloader/BLO_read_write.h +++ b/source/blender/blenloader/BLO_read_write.h @@ -43,7 +43,7 @@ /* for SDNA_TYPE_FROM_STRUCT() macro */ #include "dna_type_offsets.h" -#include "DNA_windowmanager_types.h" /* for ReportType */ +#include "DNA_windowmanager_types.h" /* for eReportType */ #ifdef __cplusplus extern "C" { @@ -252,7 +252,7 @@ void BLO_expand_id(BlendExpander *expander, struct ID *id); */ void BLO_reportf_wrap(struct BlendFileReadReport *reports, - ReportType type, + eReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f82c97443c1..bc50a14ac40 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -222,7 +222,7 @@ typedef struct BHeadN { * bit kludge but better than doubling up on prints, * we could alternatively have a versions of a report function which forces printing - campbell */ -void BLO_reportf_wrap(BlendFileReadReport *reports, ReportType type, const char *format, ...) +void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format, ...) { char fixed_buf[1024]; /* should be long enough */ diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index beeed8e45ae..75152a05063 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -31,7 +31,7 @@ #include "BLI_filereader.h" #include "DNA_sdna_types.h" #include "DNA_space_types.h" -#include "DNA_windowmanager_types.h" /* for ReportType */ +#include "DNA_windowmanager_types.h" /* for eReportType */ struct BLI_mmap_file; struct BLOCacheStorage; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 97303117dd3..3ba8f601937 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -166,7 +166,7 @@ bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool eBMOpErrorLevel level; while (BMO_error_pop(em->bm, &errmsg, NULL, &level)) { - ReportType type = RPT_INFO; + eReportType type = RPT_INFO; switch (level) { case BMO_ERROR_CANCEL: { changed_was_set = true; diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index 22064e04e86..fa722d0646a 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -146,7 +146,7 @@ void ED_undo_push(bContext *C, const char *str) } } - UndoPushReturn push_retval; + eUndoPushReturn push_retval; /* Only apply limit if this is the last undo step. */ if (wm->undo_stack->step_active && (wm->undo_stack->step_active->next == NULL)) { diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index a9016dd4edd..e24d39b61eb 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -59,7 +59,7 @@ struct wmTimer; #define KMAP_MAX_NAME 64 /* keep in sync with 'rna_enum_wm_report_items' in wm_rna.c */ -typedef enum ReportType { +typedef enum eReportType { RPT_DEBUG = (1 << 0), RPT_INFO = (1 << 1), RPT_OPERATOR = (1 << 2), @@ -69,7 +69,7 @@ typedef enum ReportType { RPT_ERROR_INVALID_INPUT = (1 << 6), RPT_ERROR_INVALID_CONTEXT = (1 << 7), RPT_ERROR_OUT_OF_MEMORY = (1 << 8), -} ReportType; +} eReportType; #define RPT_DEBUG_ALL (RPT_DEBUG) #define RPT_INFO_ALL (RPT_INFO) @@ -91,7 +91,7 @@ enum ReportListFlags { # typedef struct Report { struct Report *next, *prev; - /** ReportType. */ + /** eReportType. */ short type; short flag; /** `strlen(message)`, saves some time calculating the word wrap. */ @@ -103,9 +103,9 @@ typedef struct Report { /* saved in the wm, don't remove */ typedef struct ReportList { ListBase list; - /** ReportType. */ + /** eReportType. */ int printlevel; - /** ReportType. */ + /** eReportType. */ int storelevel; int flag; char _pad[4]; diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 4ee514edb3c..eaf32c06aba 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -178,12 +178,12 @@ void WM_opengl_context_dispose(void *context); void WM_opengl_context_activate(void *context); void WM_opengl_context_release(void *context); -/* WM_window_open alignment */ -typedef enum WindowAlignment { +/* #WM_window_open alignment */ +typedef enum eWindowAlignment { WIN_ALIGN_ABSOLUTE = 0, WIN_ALIGN_LOCATION_CENTER, WIN_ALIGN_PARENT_CENTER, -} WindowAlignment; +} eWindowAlignment; struct wmWindow *WM_window_open(struct bContext *C, const char *title, @@ -195,7 +195,7 @@ struct wmWindow *WM_window_open(struct bContext *C, bool toplevel, bool dialog, bool temp, - WindowAlignment alignment); + eWindowAlignment alignment); void WM_window_set_dpi(const wmWindow *win); @@ -372,8 +372,8 @@ void WM_main_remap_editor_id_reference(struct ID *old_id, struct ID *new_id); /* reports */ void WM_report_banner_show(void); void WM_report_banners_cancel(struct Main *bmain); -void WM_report(ReportType type, const char *message); -void WM_reportf(ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(2, 3); +void WM_report(eReportType type, const char *message); +void WM_reportf(eReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(2, 3); struct wmEvent *wm_event_add_ex(struct wmWindow *win, const struct wmEvent *event_to_add, diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 3ea61812b8a..7e8910644b6 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -804,7 +804,7 @@ static void wm_add_reports(ReportList *reports) } } -void WM_report(ReportType type, const char *message) +void WM_report(eReportType type, const char *message) { ReportList reports; BKE_reports_init(&reports, RPT_STORE); @@ -815,7 +815,7 @@ void WM_report(ReportType type, const char *message) BKE_reports_clear(&reports); } -void WM_reportf(ReportType type, const char *format, ...) +void WM_reportf(eReportType type, const char *format, ...) { va_list args; diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 8baf4a0e013..7113beef56e 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -772,7 +772,7 @@ wmWindow *WM_window_open(bContext *C, bool toplevel, bool dialog, bool temp, - WindowAlignment alignment) + eWindowAlignment alignment) { Main *bmain = CTX_data_main(C); wmWindowManager *wm = CTX_wm_manager(C);