diff options
| author | jacob1 <jfu614@gmail.com> | 2012-09-04 00:09:53 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-06 23:52:56 (GMT) |
| commit | f8f70a3f770b6cbc1e9c182572317c0968af718b (patch) | |
| tree | 03e94654817ce2c944bcc75f484313331e2daf9d /src/Misc.cpp | |
| parent | 58fa3dd539ad0ee7ebb44ec68515bdc22956c095 (diff) | |
| download | powder-f8f70a3f770b6cbc1e9c182572317c0968af718b.zip powder-f8f70a3f770b6cbc1e9c182572317c0968af718b.tar.gz | |
Visual studio compatibility
This removes some inlines when using visual studio to compile, uisng TPT_NO_INLINE. It also fixes many other problems visual studio has with the code
Diffstat (limited to 'src/Misc.cpp')
| -rw-r--r-- | src/Misc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Misc.cpp b/src/Misc.cpp index c7481ab..54ee4be 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -111,7 +111,7 @@ int isign(float i) //TODO: INline or macro return 0; } -TPT_INLINE unsigned clamp_flt(float f, float min, float max) //TODO: Also inline/macro +TPT_NO_INLINE unsigned clamp_flt(float f, float min, float max) //TODO: Also inline/macro { if (f<min) return 0; @@ -120,7 +120,7 @@ TPT_INLINE unsigned clamp_flt(float f, float min, float max) //TODO: Also inline return (int)(255.0f*(f-min)/(max-min)); } -TPT_INLINE float restrict_flt(float f, float min, float max) //TODO Inline or macro or something +TPT_NO_INLINE float restrict_flt(float f, float min, float max) //TODO Inline or macro or something { if (f<min) return min; @@ -623,7 +623,7 @@ void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b)//convert 0-255(0-360 for ss = s/255.0f; vv = v/255.0f; c = vv * ss; - x = c * ( 1 - fabs(fmod(hh,2.0) -1) ); + x = c * ( 1 - fabs(fmod(hh,2.0f) -1) ); if(hh<1){ *r = (int)(c*255.0); *g = (int)(x*255.0); |
