Page Menu
Home
Search
Configure Global Search
Log In
Paste
P456
Compile fixes for D2576
Active
Public
Actions
Authored by
Julian Eisel (Severin)
on Mar 23 2017, 10:46 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 9653ae6..09f40c0 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -678,7 +678,7 @@ int screen_area_join(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
* screen_area_join_partially is for when area_jointype=2)
* return value 0=failed, 1=success
* used by the join operator */
-int screen_area_join_partially(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
+int screen_area_join_partially(bContext *UNUSED(C), bScreen *scr, ScrArea *sa1, ScrArea *sa2)
{
ScrVert *v;
int dir;
@@ -1061,10 +1061,10 @@ static void draw_horizontal_join_shape(ScrArea *sa1, ScrArea *sa2, char dir)
v2.x = sa2->v2->vec.x;
v3.x = sa2->v3->vec.x;
v4.x = sa2->v4->vec.x;
- v1.y = max(sa2->v1->vec.y, sa1->v1->vec.y);
- v2.y = min(sa2->v2->vec.y, sa1->v2->vec.y);
- v3.y = min(sa2->v3->vec.y, sa1->v3->vec.y);
- v4.y = max(sa2->v4->vec.y, sa1->v4->vec.y);
+ v1.y = MAX2(sa2->v1->vec.y, sa1->v1->vec.y);
+ v2.y = MIN2(sa2->v2->vec.y, sa1->v2->vec.y);
+ v3.y = MIN2(sa2->v3->vec.y, sa1->v3->vec.y);
+ v4.y = MAX2(sa2->v4->vec.y, sa1->v4->vec.y);
width = v3.x - v1.x;
height = v3.y - v1.y;
@@ -1146,10 +1146,10 @@ static void draw_vertical_join_shape(ScrArea *sa1, ScrArea *sa2, char dir)
v2.y = sa2->v2->vec.y;
v3.y = sa2->v3->vec.y;
v4.y = sa2->v4->vec.y;
- v1.x = max(sa2->v1->vec.x, sa1->v1->vec.x);
- v2.x = max(sa2->v2->vec.x, sa1->v2->vec.x);
- v3.x = min(sa2->v3->vec.x, sa1->v3->vec.x);
- v4.x = min(sa2->v4->vec.x, sa1->v4->vec.x);
+ v1.x = MAX2(sa2->v1->vec.x, sa1->v1->vec.x);
+ v2.x = MAX2(sa2->v2->vec.x, sa1->v2->vec.x);
+ v3.x = MIN2(sa2->v3->vec.x, sa1->v3->vec.x);
+ v4.x = MIN2(sa2->v4->vec.x, sa1->v4->vec.x);
width = v3.x - v1.x;
height = v3.y - v1.y;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f63dd45..6c3805f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2605,6 +2605,8 @@ static int area_join_apply(bContext *C, wmOperator *op)
}
return 1;
}
+
+ return 0;
}
/* finish operation */
Event Timeline
Julian Eisel (Severin)
created this paste.
Mar 23 2017, 10:46 PM
Julian Eisel (Severin)
mentioned this in
D2576: Allow joining of one area into part of another
.
Mar 23 2017, 10:48 PM
Log In to Comment