Re: peer code review/advice needed for noob programmer



On Tue, 22 May 2007 09:12:12 -0400, Joseph M. Newcomer
<newcomer@xxxxxxxxxxxx> wrote:


RETVALUE CMyClass::Buffer2HexString( const BYTE* pBuffer, const unsigned int
pBufferSize, char** pString )

I wouldhave written this as
RETVALUE CMyClass::Buffer2HexString(CByteArray & Buffer, CString & String)

In addition to very useful and meaningful Joe's notes, I would like to
adjust the prototype to use the C++ const-correctness (we had some
posts about that recently).

RETVALUE CMyClass::Buffer2HexString(
const CByteArray & Buffer, // <-- input read-only buffer
CString & String
)

In fact, the original prototype used 'const BYTE *', so I get that the
input byte array is a const parameter.


MrAsm
.