Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: fusl/include/complex.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/include/complex.h
diff --git a/fusl/include/complex.h b/fusl/include/complex.h
index 008b3c7e3b7d6190cb864892aa7b2bad3f1aa2cf..8a12ddfa2b75c377c6cc3770c66df8d7576f981c 100644
--- a/fusl/include/complex.h
+++ b/fusl/include/complex.h
@@ -7,9 +7,9 @@ extern "C" {
#define complex _Complex
#ifdef __GNUC__
-#define _Complex_I (__extension__ (0.0f+1.0fi))
+#define _Complex_I (__extension__(0.0f + 1.0fi))
#else
-#define _Complex_I (0.0f+1.0fi)
+#define _Complex_I (0.0f + 1.0fi)
#endif
#define I _Complex_I
@@ -102,8 +102,12 @@ float crealf(float complex);
long double creall(long double complex);
#ifndef __cplusplus
-#define __CIMAG(x, t) \
- (+(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])
+#define __CIMAG(x, t) \
+ (+(union { \
+ _Complex t __z; \
+ t __xy[2]; \
+ }){(_Complex t)(x)} \
+ .__xy[1])
#define creal(x) ((double)(x))
#define crealf(x) ((float)(x))
@@ -116,9 +120,9 @@ long double creall(long double complex);
#if __STDC_VERSION__ >= 201112L
#if defined(_Imaginary_I)
-#define __CMPLX(x, y, t) ((t)(x) + _Imaginary_I*(t)(y))
+#define __CMPLX(x, y, t) ((t)(x) + _Imaginary_I * (t)(y))
#elif defined(__clang__)
-#define __CMPLX(x, y, t) (+(_Complex t){ (t)(x), (t)(y) })
+#define __CMPLX(x, y, t) (+(_Complex t){(t)(x), (t)(y)})
#else
#define __CMPLX(x, y, t) (__builtin_complex((t)(x), (t)(y)))
#endif

Powered by Google App Engine
This is Rietveld 408576698