From 14de1cd5eb72e87507b4b84a2c178f47972c2cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 1 Jun 2016 18:44:06 +0200 Subject: [PATCH] Restrict for MSVC (#3794) --- src/common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index bbbb1fcf1f..69c29d6f17 100644 --- a/src/common.h +++ b/src/common.h @@ -39,11 +39,15 @@ // aliasing the same memory area. Using it lets compiler generate better code. If your compiler // does not support it, feel free to drop it, at some performance hit. #ifdef __cplusplus - #if __GNUC__ + #if _MSC_VER + #define RESTRICT __restrict + #else #define RESTRICT __restrict__ #endif #else - #if __GNUC__ + #if _MSC_VER + #define RESTRICT __restrict + #else #define RESTRICT restrict #endif #endif