diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-01-01 14:14:25 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-01-01 14:14:25 +0300 |
commit | a11c4cd041a548e4255f9e202cd272fa238d9a29 (patch) | |
tree | c7b23fdd82a98ae172a98b6f272beb6fa94c6588 | |
parent | 7052576344b93e107be294f495fab5406f36b6f9 (diff) |
* silence more warnings
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 6 | ||||
-rw-r--r-- | intern/string/STR_String.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 178c79e4aeb..500f13670b7 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -737,15 +737,15 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam) */ /* convert raw fixed point data to radians */ - altRad = (fabs((float)ort.orAltitude)/(float)m_maxAltitude) * M_PI/2.0; - azmRad = ((float)ort.orAzimuth/(float)m_maxAzimuth) * M_PI*2.0; + altRad = (float)((fabs((float)ort.orAltitude)/(float)m_maxAltitude) * M_PI/2.0); + azmRad = (float)(((float)ort.orAzimuth/(float)m_maxAzimuth) * M_PI*2.0); /* find length of the stylus' projected vector on the XY plane */ vecLen = cos(altRad); /* from there calculate X and Y components based on azimuth */ m_tabletData->Xtilt = sin(azmRad) * vecLen; - m_tabletData->Ytilt = sin(M_PI/2.0 - azmRad) * vecLen; + m_tabletData->Ytilt = (float)(sin(M_PI/2.0 - azmRad) * vecLen); } else { m_tabletData->Xtilt = 0.0f; diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h index 2da2b57c6f2..0da0e2f2986 100644 --- a/intern/string/STR_String.h +++ b/intern/string/STR_String.h @@ -141,7 +141,7 @@ public: inline operator const char *() const { return pData; } inline char *Ptr() { return pData; } inline const char *ReadPtr() const { return pData; } - inline float ToFloat() const { float x=atof(pData); return x; } + inline float ToFloat() const { float x=(float)(atof(pData)); return x; } inline int ToInt() const { return atoi(pData); } // Operators |