STYLE: Make sure to use the proper cast.

This commit is contained in:
Mathieu Malaterre 2006-03-10 12:01:29 -05:00
parent 1ef5bdf669
commit 5fe4a9dcef
4 changed files with 32 additions and 32 deletions

View File

@ -396,7 +396,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
else
{
cexpr.append(1, (char)ch);
cexpr.append(1, static_cast<char>(ch));
}
}
if ( cexpr.size() > 0 )

View File

@ -798,7 +798,7 @@ kwsys_stl::string RegistryHelper::DecodeValue(const char* str)
case '%':
if ( *(str+1) && *(str+2) && sscanf(str+1, "%x", &val) == 1 )
{
ostr << (char)val;
ostr << static_cast<char>(val);
str += 2;
}
else

View File

@ -14,7 +14,7 @@
//
// Copyright (C) 1991 Texas Instruments Incorporated.
//
// Permission is granted to any individual or institution to use, copy, modify,
// Permission is granted to any individual or institution to use, copy, modify
// and distribute this software, provided that this complete copyright and
// permission notice is maintained, intact, in all copies and supporting
// documentation.
@ -345,7 +345,7 @@ bool RegularExpression::compile (const char* exp) {
if (this->program != 0) delete [] this->program;
//#endif
this->program = new char[regsize];
this->progsize = (int) regsize;
this->progsize = static_cast<int>(regsize);
if (this->program == 0) {
//RAISE Error, SYM(RegularExpression), SYM(Out_Of_Memory),

View File

@ -22,7 +22,7 @@
# include "kwsys_ios_iostream.h.in"
#endif
void* random_ptr = (void*)0x123;
void* random_ptr = reinterpret_cast<void*>(0x123);
int argument(const char* arg, const char* value, void* call_data)
{