STYLE: Make sure to use the proper cast.
This commit is contained in:
parent
1ef5bdf669
commit
5fe4a9dcef
@ -396,7 +396,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cexpr.append(1, (char)ch);
|
cexpr.append(1, static_cast<char>(ch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( cexpr.size() > 0 )
|
if ( cexpr.size() > 0 )
|
||||||
|
@ -798,7 +798,7 @@ kwsys_stl::string RegistryHelper::DecodeValue(const char* str)
|
|||||||
case '%':
|
case '%':
|
||||||
if ( *(str+1) && *(str+2) && sscanf(str+1, "%x", &val) == 1 )
|
if ( *(str+1) && *(str+2) && sscanf(str+1, "%x", &val) == 1 )
|
||||||
{
|
{
|
||||||
ostr << (char)val;
|
ostr << static_cast<char>(val);
|
||||||
str += 2;
|
str += 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 1991 Texas Instruments Incorporated.
|
// 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
|
// and distribute this software, provided that this complete copyright and
|
||||||
// permission notice is maintained, intact, in all copies and supporting
|
// permission notice is maintained, intact, in all copies and supporting
|
||||||
// documentation.
|
// documentation.
|
||||||
@ -345,7 +345,7 @@ bool RegularExpression::compile (const char* exp) {
|
|||||||
if (this->program != 0) delete [] this->program;
|
if (this->program != 0) delete [] this->program;
|
||||||
//#endif
|
//#endif
|
||||||
this->program = new char[regsize];
|
this->program = new char[regsize];
|
||||||
this->progsize = (int) regsize;
|
this->progsize = static_cast<int>(regsize);
|
||||||
|
|
||||||
if (this->program == 0) {
|
if (this->program == 0) {
|
||||||
//RAISE Error, SYM(RegularExpression), SYM(Out_Of_Memory),
|
//RAISE Error, SYM(RegularExpression), SYM(Out_Of_Memory),
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# include "kwsys_ios_iostream.h.in"
|
# include "kwsys_ios_iostream.h.in"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void* random_ptr = (void*)0x123;
|
void* random_ptr = reinterpret_cast<void*>(0x123);
|
||||||
|
|
||||||
int argument(const char* arg, const char* value, void* call_data)
|
int argument(const char* arg, const char* value, void* call_data)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user