Use member initialization lists [-Weffc++] (#270)

This commit is contained in:
J-P Nurmi
2015-02-28 21:59:01 +01:00
parent a1165cfcca
commit 6a6bb648d1
26 changed files with 63 additions and 110 deletions
+6 -4
View File
@@ -774,10 +774,12 @@ void CTable::Clear() {
}
#ifdef HAVE_LIBSSL
CBlowfish::CBlowfish(const CString & sPassword, int iEncrypt, const CString & sIvec) {
m_iEncrypt = iEncrypt;
m_ivec = (unsigned char *)calloc(sizeof(unsigned char), 8);
m_num = 0;
CBlowfish::CBlowfish(const CString & sPassword, int iEncrypt, const CString & sIvec)
: m_ivec((unsigned char *)calloc(sizeof(unsigned char), 8)),
m_bkey(),
m_iEncrypt(iEncrypt),
m_num(0)
{
if (sIvec.length() >= 8) {
memcpy(m_ivec, sIvec.data(), 8);