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:
authorCampbell Barton <ideasman42@gmail.com>2021-04-11 07:43:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-11 07:43:05 +0300
commit1241e9170711acfa0fbf99d5289b0241f6db1c23 (patch)
tree92bc1bcd417605c771046cebd7741126e10700a0 /source/blender/windowmanager/intern
parentf9c0d7261a22d8d237e8cc23453c636c3a09c58b (diff)
Cleanup: use ELEM, STREQ macros
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 9684c21605a..b7a16b6c5ee 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -372,7 +372,7 @@ wmDragAsset *WM_drag_get_asset_data(const wmDrag *drag, int idcode)
}
wmDragAsset *asset_drag = drag->poin;
- return (idcode == 0 || asset_drag->id_type == idcode) ? asset_drag : NULL;
+ return (ELEM(idcode, 0, asset_drag->id_type)) ? asset_drag : NULL;
}
static ID *wm_drag_asset_id_import(wmDragAsset *asset_drag)
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 791aeeb39cd..627ec1d5722 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -580,7 +580,7 @@ void wm_event_do_notifiers(bContext *C)
if ((note->category == NC_SPACE) && note->reference) {
/* Filter out notifiers sent to other spaces. RNA sets the reference to the owning ID
* though, the screen, so let notifiers through that reference the entire screen. */
- if ((note->reference != area->spacedata.first) && (note->reference != screen)) {
+ if (!ELEM(note->reference, area->spacedata.first, screen)) {
continue;
}
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index eb1da15807c..2e9fd1b1b16 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -812,7 +812,7 @@ wmWindow *WM_window_open(bContext *C,
LISTBASE_FOREACH (wmWindow *, win_iter, &wm->windows) {
if (WM_window_is_temp_screen(win_iter)) {
char *wintitle = GHOST_GetTitle(win_iter->ghostwin);
- if (strcmp(title, wintitle) == 0) {
+ if (STREQ(title, wintitle)) {
win = win_iter;
}
free(wintitle);