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>2012-05-19 17:28:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
commitaf3e348430218e609c80d86c8dd418bed15e70e8 (patch)
treea93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/editors/interface/view2d.c
parent2f5173887e0c7f6ba19664f16b177e575d82a241 (diff)
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index ed010dc973a..2eea7f50f33 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -419,14 +419,14 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* check if we should restore aspect ratio (if view size changed) */
if (v2d->keepzoom & V2D_KEEPASPECT) {
- short do_x = 0, do_y = 0, do_cur /* , do_win */ /* UNUSED */;
+ short do_x = FALSE, do_y = FALSE, do_cur /* , do_win */ /* UNUSED */;
float /* curRatio, */ /* UNUSED */ winRatio;
/* when a window edge changes, the aspect ratio can't be used to
* find which is the best new 'cur' rect. thats why it stores 'old'
*/
- if (winx != v2d->oldwinx) do_x = 1;
- if (winy != v2d->oldwiny) do_y = 1;
+ if (winx != v2d->oldwinx) do_x = TRUE;
+ if (winy != v2d->oldwiny) do_y = TRUE;
/* curRatio= height / width; */ /* UNUSED */
winRatio = winy / winx;
@@ -435,11 +435,11 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
if (do_x == do_y) {
if (do_x && do_y) {
/* here is 1,1 case, so all others must be 0,0 */
- if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = 0;
- else do_x = 0;
+ if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = FALSE;
+ else do_x = FALSE;
}
- else if (winRatio > 1.0f) do_x = 0;
- else do_x = 1;
+ else if (winRatio > 1.0f) do_x = FALSE;
+ else do_x = TRUE;
}
do_cur = do_x;
/* do_win= do_y; */ /* UNUSED */