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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-07-28 21:35:09 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-07-28 21:35:09 +0400
commita7e943c8506fc13da59b58f33c3a7472423d5c19 (patch)
tree9c88eb09890dd8e5899de9505e54b767b558bd48 /intern/raskter
parent3ec212fd71ee5b8aed165d4361f0c9d0f7152b9e (diff)
Blender now compiles with recent clang
Diffstat (limited to 'intern/raskter')
-rw-r--r--intern/raskter/raskter.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c
index e2d4809a23c..659d01e2d82 100644
--- a/intern/raskter/raskter.c
+++ b/intern/raskter/raskter.c
@@ -37,6 +37,15 @@
#endif
+// this is needed for inlining behavior
+#if defined _WIN32
+# define DO_INLINE __inline
+#elif defined (__sun) || defined (__sun__)
+# define DO_INLINE
+#else
+# define DO_INLINE static inline
+#endif
+
/*
* Sort all the edges of the input polygon by Y, then by X, of the "first" vertex encountered.
@@ -814,14 +823,14 @@ int get_range_expanded_pixel_coord(float normalized_value, int max_value) {
return (int)((normalized_value * (float)(max_value)) + 0.5f);
}
-__inline float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y) {
+DO_INLINE float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y) {
if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) {
return 0.0f;
}
return buf[(pos_y * buf_x) + pos_x];
}
-__inline float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v) {
+DO_INLINE float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v) {
int a;
int b;
int a_plus_1;
@@ -847,7 +856,7 @@ __inline float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, fl
}
-__inline void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity) {
+DO_INLINE void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity) {
if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) {
return;
}