Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2014-07-26 19:23:52 +0400
committerMilo Yip <miloyip@gmail.com>2014-07-26 19:23:52 +0400
commitb99a515ef2f9fc9f9df55a1a051e00db29365129 (patch)
tree42c9624016267aaff8d7c13097fd11228bd94505 /include
parent58e0fb89b218657ce994b4213f5c8956b7a5ecc5 (diff)
Define RAPIDJSON_FORCEINLINE for gcc
Performance boost a lot!
Diffstat (limited to 'include')
-rw-r--r--include/rapidjson/rapidjson.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rapidjson/rapidjson.h b/include/rapidjson/rapidjson.h
index 1608ce89..4aef17dc 100644
--- a/include/rapidjson/rapidjson.h
+++ b/include/rapidjson/rapidjson.h
@@ -41,6 +41,8 @@
#ifndef RAPIDJSON_FORCEINLINE
#ifdef _MSC_VER
#define RAPIDJSON_FORCEINLINE __forceinline
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define RAPIDJSON_FORCEINLINE __attribute__((always_inline))
#else
#define RAPIDJSON_FORCEINLINE
#endif