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>2014-02-03 11:59:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-03 12:35:44 +0400
commit107566ebf1cf7d563a00f64615410c2b7d443c00 (patch)
treed10365de620ea16485b82034ee13df2231a5ea4c /source/blender/editors/screen
parentd900f5be55d0812eb5c7dfd3ea47020c3edafd41 (diff)
Code cleanup: check -1 for error return explicitly
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_edit.c4
-rw-r--r--source/blender/editors/screen/screen_ops.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index fa7fd62231b..4674a5b36a3 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -580,7 +580,7 @@ int screen_area_join(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
dir = area_getorientation(sa1, sa2);
/*printf("dir is : %i\n", dir);*/
- if (dir < 0) {
+ if (dir == -1) {
if (sa1) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
if (sa2) sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
return 0;
@@ -1142,7 +1142,7 @@ void ED_screen_draw(wmWindow *win)
/* blended join arrow */
if (sa1 && sa2) {
dir = area_getorientation(sa1, sa2);
- if (dir >= 0) {
+ if (dir != -1) {
switch (dir) {
case 0: /* W */
dir = 'r';
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index ae1b7cc937f..53a1f4fc8ca 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2516,7 +2516,7 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (sa) {
if (jd->sa1 != sa) {
dir = area_getorientation(jd->sa1, sa);
- if (dir >= 0) {
+ if (dir != -1) {
if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
jd->sa2 = sa;
jd->sa2->flag |= AREA_FLAG_DRAWJOINTO;
@@ -2527,7 +2527,7 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
* in this case we can swap areas.
*/
dir = area_getorientation(sa, jd->sa2);
- if (dir >= 0) {
+ if (dir != -1) {
if (jd->sa1) jd->sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
jd->sa1 = jd->sa2;
@@ -2553,13 +2553,13 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (jd->sa1) jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM;
if (jd->sa2) jd->sa2->flag |= AREA_FLAG_DRAWJOINTO;
dir = area_getorientation(jd->sa1, jd->sa2);
- if (dir < 0) {
+ if (dir == -1) {
printf("oops, didn't expect that!\n");
}
}
else {
dir = area_getorientation(jd->sa1, sa);
- if (dir >= 0) {
+ if (dir != -1) {
if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
jd->sa2 = sa;
jd->sa2->flag |= AREA_FLAG_DRAWJOINTO;