BinaryToHex(string)
change BinaryToHex(p*) to void*
This commit is contained in:
@@ -142,8 +142,9 @@ bool IsHexVal( const RString &s )
|
||||
return true;
|
||||
}
|
||||
|
||||
RString BinaryToHex( const unsigned char *string, int iNumBytes )
|
||||
RString BinaryToHex( const void *pData_, int iNumBytes )
|
||||
{
|
||||
const unsigned char *string = (const unsigned char *) pData_;
|
||||
RString s;
|
||||
for( int i=0; i<iNumBytes; i++ )
|
||||
{
|
||||
@@ -153,6 +154,11 @@ RString BinaryToHex( const unsigned char *string, int iNumBytes )
|
||||
return s;
|
||||
}
|
||||
|
||||
RString BinaryToHex( const RString &sString )
|
||||
{
|
||||
return BinaryToHex( sString.data(), sString.size() );
|
||||
}
|
||||
|
||||
bool HexToBinary( const RString &s, unsigned char *stringOut )
|
||||
{
|
||||
if( !IsHexVal(s) )
|
||||
|
||||
@@ -333,7 +333,8 @@ float fmodfp( float x, float y );
|
||||
int power_of_two( int input );
|
||||
bool IsAnInt( const RString &s );
|
||||
bool IsHexVal( const RString &s );
|
||||
RString BinaryToHex( const unsigned char *string, int iNumBytes );
|
||||
RString BinaryToHex( const void *pData_, int iNumBytes );
|
||||
RString BinaryToHex( const RString &sString );
|
||||
bool HexToBinary( const RString &s, unsigned char *stringOut );
|
||||
float HHMMSSToSeconds( const RString &sHMS );
|
||||
RString SecondsToHHMMSS( float fSecs );
|
||||
|
||||
Reference in New Issue
Block a user