diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-13 22:24:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-14 09:21:12 +0100 |
commit | ad4786b285074b5bd70b3ad0bea6ec1b77ad6740 (patch) | |
tree | aab0649444e06516357e3f77d69c6e22a4c06d84 /src/sna/sna_transform.c | |
parent | a05c3547bba52288bae872ea672ffe2f4dab2ffa (diff) |
sna: Aim for consistency and use stdbool except for core X APIs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_transform.c')
-rw-r--r-- | src/sna/sna_transform.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sna/sna_transform.c b/src/sna/sna_transform.c index 54852b1f..55cc1ade 100644 --- a/src/sna/sna_transform.c +++ b/src/sna/sna_transform.c @@ -38,22 +38,22 @@ * * transform may be null. */ -Bool sna_transform_is_affine(const PictTransform *t) +bool sna_transform_is_affine(const PictTransform *t) { if (t == NULL) - return TRUE; + return true; return t->matrix[2][0] == 0 && t->matrix[2][1] == 0; } -Bool +bool sna_transform_is_translation(const PictTransform *t, pixman_fixed_t *tx, pixman_fixed_t *ty) { if (t == NULL) { *tx = *ty = 0; - return TRUE; + return true; } if (t->matrix[0][0] != IntToxFixed(1) || @@ -63,19 +63,19 @@ sna_transform_is_translation(const PictTransform *t, t->matrix[2][0] != 0 || t->matrix[2][1] != 0 || t->matrix[2][2] != IntToxFixed(1)) - return FALSE; + return false; *tx = t->matrix[0][2]; *ty = t->matrix[1][2]; - return TRUE; + return true; } -Bool +bool sna_transform_is_integer_translation(const PictTransform *t, int16_t *tx, int16_t *ty) { if (t == NULL) { *tx = *ty = 0; - return TRUE; + return true; } if (t->matrix[0][0] != IntToxFixed(1) || @@ -85,15 +85,15 @@ sna_transform_is_integer_translation(const PictTransform *t, int16_t *tx, int16_ t->matrix[2][0] != 0 || t->matrix[2][1] != 0 || t->matrix[2][2] != IntToxFixed(1)) - return FALSE; + return false; if (pixman_fixed_fraction(t->matrix[0][2]) || pixman_fixed_fraction(t->matrix[1][2])) - return FALSE; + return false; *tx = pixman_fixed_to_int(t->matrix[0][2]); *ty = pixman_fixed_to_int(t->matrix[1][2]); - return TRUE; + return true; } /** |