Many Unhappy Returns
by in CodeSOD on 2024-05-14Gavin continues work on the old C++ app he inherited. Today we get a delightful smattering of bad choices.
HRESULT CExAPI::GetPageCacheForFolder( IN CEntryID *p_cio_Folder, OUT CPageCache **pp_PC )
{
CEntryID *p_cio_Local = new CEntryID( this, p_cio_Folder );
switch ( p_cio_Folder->m_uiType )
{
case EID_TYPE_EMPTY:
return S_OK;
break;
case EID_TYPE_NORMAL :
return GetPageCacheForNormalFolder(p_cio_Folder, pp_PC );
break;
case EID_TYPE_ADDRESSBOOK :
return GetPageCacheForABFolder(p_cio_Folder, 0, pp_PC );
break;
}
return S_OK;
DeleteIfNotNULL( p_cio_Local );
}