summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-12 13:21:26 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-12 13:21:26 (GMT)
commit2e1882389b5908d817a664bd617a5ffc2a8ddfa0 (patch)
treea27fa4d2a8603d44e7ad4b904e6e53d087aa97fb /Source/kwsys/SystemTools.cxx
parentdaa99e753d4c9c24d40c680012a825c1d704040a (diff)
downloadCMake-2e1882389b5908d817a664bd617a5ffc2a8ddfa0.zip
CMake-2e1882389b5908d817a664bd617a5ffc2a8ddfa0.tar.gz
CMake-2e1882389b5908d817a664bd617a5ffc2a8ddfa0.tar.bz2
COMP: Remove warnings
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 06eccde..1107fe5 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -237,10 +237,10 @@ SystemTools::GetTime(void)
struct timeval t;
#ifdef GETTIMEOFDAY_NO_TZ
if (gettimeofday(&t) == 0)
- return (double)t.tv_sec + t.tv_usec*0.000001;
+ return static_cast<double>(t.tv_sec) + t.tv_usec*0.000001;
#else /* !GETTIMEOFDAY_NO_TZ */
- if (gettimeofday(&t, (struct timezone *)NULL) == 0)
- return (double)t.tv_sec + t.tv_usec*0.000001;
+ if (gettimeofday(&t, static_cast<struct timezone *>(NULL)) == 0)
+ return static_cast<double>(t.tv_sec) + t.tv_usec*0.000001;
#endif /* !GETTIMEOFDAY_NO_TZ */
}
#endif /* !HAVE_GETTIMEOFDAY */
@@ -248,11 +248,12 @@ SystemTools::GetTime(void)
#if defined(HAVE_FTIME)
struct TIMEB t;
::FTIME(&t);
- return (double)t.time + (double)t.millitm * (double)0.001;
+ return static_cast<double>(t.time) +
+ static_cast<double>(t.millitm) * static_cast<double>(0.001);
#else /* !HAVE_FTIME */
time_t secs;
time(&secs);
- return (double)secs;
+ return static_cast<double>(secs);
#endif /* !HAVE_FTIME */
}
}
@@ -1246,7 +1247,7 @@ int SystemTools::EstimateFormatLength(const char *format, va_list ap)
}
}
- return (int)length;
+ return static_cast<int>(length);
}
kwsys_stl::string SystemTools::EscapeChars(