Mesa (master): util/r11g11b10f: Whitespace cleanups

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Aug 5 16:14:21 UTC 2016


Module: Mesa
Branch: master
Commit: 21f357b66e5638e3640cf3b3fbaa992dc764c49f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=21f357b66e5638e3640cf3b3fbaa992dc764c49f

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Aug  3 11:06:19 2016 -0700

util/r11g11b10f: Whitespace cleanups

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/util/format_r11g11b10f.h | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/util/format_r11g11b10f.h b/src/util/format_r11g11b10f.h
index 5fe2e51..c9e967c 100644
--- a/src/util/format_r11g11b10f.h
+++ b/src/util/format_r11g11b10f.h
@@ -86,8 +86,7 @@ static inline uint32_t f32_to_uf11(float val)
        *      converted to 65024."
        */
       uf11 = UF11(30, 63);
-   }
-   else if (exponent > -15) { /* Representable value */
+   } else if (exponent > -15) { /* Representable value */
       exponent += UF11_EXPONENT_BIAS;
       mantissa >>= UF11_MANTISSA_SHIFT;
       uf11 = exponent << UF11_EXPONENT_SHIFT | mantissa;
@@ -113,17 +112,14 @@ static inline float uf11_to_f32(uint16_t val)
          const float scale = 1.0 / (1 << 20);
          f32.f = scale * mantissa;
       }
-   }
-   else if (exponent == 31) {
+   } else if (exponent == 31) {
       f32.ui = F32_INFINITY | mantissa;
-   }
-   else {
+   } else {
       float scale, decimal;
       exponent -= 15;
       if (exponent < 0) {
          scale = 1.0f / (1 << -exponent);
-      }
-      else {
+      } else {
          scale = (float) (1 << exponent);
       }
       decimal = 1.0f + (float) mantissa / 64;
@@ -172,8 +168,7 @@ static inline uint32_t f32_to_uf10(float val)
        *      converted to 64512."
        */
       uf10 = UF10(30, 31);
-   }
-   else if (exponent > -15) { /* Representable value */
+   } else if (exponent > -15) { /* Representable value */
       exponent += UF10_EXPONENT_BIAS;
       mantissa >>= UF10_MANTISSA_SHIFT;
       uf10 = exponent << UF10_EXPONENT_SHIFT | mantissa;
@@ -199,11 +194,9 @@ static inline float uf10_to_f32(uint16_t val)
          const float scale = 1.0 / (1 << 20);
          f32.f = scale * mantissa;
       }
-   }
-   else if (exponent == 31) {
+   } else if (exponent == 31) {
       f32.ui = F32_INFINITY | mantissa;
-   }
-   else {
+   } else {
       float scale, decimal;
       exponent -= 15;
       if (exponent < 0) {




More information about the mesa-commit mailing list