From c2f211e6969b7724eed2854b11f44a9f6e3bf71f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 21 Sep 2009 02:55:46 +0000 Subject: [PATCH] HexToBinary for RString -> RString --- stepmania/src/RageUtil.cpp | 6 ++++++ stepmania/src/RageUtil.h | 1 + 2 files changed, 7 insertions(+) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 13d48abf4d..09188b9692 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -178,6 +178,12 @@ bool HexToBinary( const RString &s, unsigned char *stringOut ) return true; } +bool HexToBinary( const RString &s, RString &sOut ) +{ + sOut.resize(s.size() / 2); + return HexToBinary(s, (unsigned char *) sOut.data()); +} + float HHMMSSToSeconds( const RString &sHHMMSS ) { vector arrayBits; diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index 62eb97546a..435e9c8502 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -337,6 +337,7 @@ bool IsHexVal( const RString &s ); RString BinaryToHex( const void *pData_, int iNumBytes ); RString BinaryToHex( const RString &sString ); bool HexToBinary( const RString &s, unsigned char *stringOut ); +bool HexToBinary( const RString &s, RString &sOut ); float HHMMSSToSeconds( const RString &sHMS ); RString SecondsToHHMMSS( float fSecs ); RString SecondsToMSSMsMs( float fSecs );