diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-08-09 14:05:34 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-08-09 14:35:28 +0200 |
commit | da49e36a81d2d0adbc7af12597f77978f3188478 (patch) | |
tree | 0540f2adb57f101df17f3c5edd11883361b1f858 /crawl-ref/source/msvc.h | |
parent | 4a61b4e1c3ef69e9c138c941a127877e223cb338 (diff) | |
download | crawl-ref-da49e36a81d2d0adbc7af12597f77978f3188478.tar.gz crawl-ref-da49e36a81d2d0adbc7af12597f77978f3188478.zip |
Make inline functions static.
This avoids unnecessary non-inlined copies.
Also, we had a few large functions that had no reason for inlining, let's
have them be regular ones.
I also made "static inline" always use the same order, for easier grepping.
Diffstat (limited to 'crawl-ref/source/msvc.h')
-rw-r--r-- | crawl-ref/source/msvc.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/msvc.h b/crawl-ref/source/msvc.h index 4ebe802b24..b07e524ec9 100644 --- a/crawl-ref/source/msvc.h +++ b/crawl-ref/source/msvc.h @@ -49,7 +49,7 @@ #pragma warning(disable : 4996) -inline double round(double x) +static inline double round(double x) { if (x >= 0.0) return floor(x + 0.5); @@ -57,27 +57,27 @@ inline double round(double x) return ceil(x - 0.5); } -inline double sqrt(int x) +static inline double sqrt(int x) { return sqrt((double)x); } -inline double atan2(int x, int y) +static inline double atan2(int x, int y) { return atan2((double)x, (double)y); } -inline double pow(int x, double y) +static inline double pow(int x, double y) { return pow((double)x, y); } -inline double pow(int x, int y) +static inline double pow(int x, int y) { return pow((double)x, y); } -inline double log(int x) +static inline double log(int x) { return log((double)x); } |