From 7839a9fd60d9ae728502de3ef4498089e0aad350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E7=A7=8B=E4=BA=AE?= Date: Mon, 7 Nov 2016 12:54:03 -0800 Subject: [PATCH] Add inline definition for Microsoft Visual Studio Summary: The inline keyword is available only in C++. The __inline and __forceinline keywords are available in both C and C++. For compatibility with previous versions, _inline is a synonym for __inline. https://msdn.microsoft.com/en-us/library/z8y1yy88(v=vs.120).aspx Closes https://github.com/facebook/css-layout/pull/239 Reviewed By: astreet Differential Revision: D4138941 Pulled By: emilsjolander fbshipit-source-id: cb59dc91ef285e5378036c4912217fd4ec8d9f79 --- React/CSSLayout/CSSLayout.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/React/CSSLayout/CSSLayout.c b/React/CSSLayout/CSSLayout.c index 07a0c695d..ebde96c0b 100644 --- a/React/CSSLayout/CSSLayout.c +++ b/React/CSSLayout/CSSLayout.c @@ -16,6 +16,10 @@ #include #define isnan _isnan +#ifndef __cplusplus +#define inline __inline +#endif + /* define fmaxf if < VC12 */ #if _MSC_VER < 1800 __forceinline const float fmaxf(const float a, const float b) {