add default cases to some switch statements

This commit is contained in:
Ondřej Hošek 2012-06-30 14:42:31 +02:00
parent 37f312cde2
commit 92b096bbd4
10 changed files with 58 additions and 0 deletions

View File

@ -203,10 +203,14 @@ hlBool CBSPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], uiPaletteSize, hlFalse);
return hlTrue;
}
default:
break;
}
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -517,6 +517,8 @@ hlUInt CDirectoryFolder::GetSize(hlBool bRecurse) const
case HL_ITEM_FILE:
uiSize += static_cast<const CDirectoryFile *>(pItem)->GetSize();
break;
default:
break;
}
}
@ -541,6 +543,8 @@ hlULongLong CDirectoryFolder::GetSizeEx(hlBool bRecurse) const
case HL_ITEM_FILE:
uiSize += static_cast<hlULongLong>(static_cast<const CDirectoryFile *>(pItem)->GetSize());
break;
default:
break;
}
}
@ -565,6 +569,8 @@ hlUInt CDirectoryFolder::GetSizeOnDisk(hlBool bRecurse) const
case HL_ITEM_FILE:
uiSize += static_cast<const CDirectoryFile *>(pItem)->GetSizeOnDisk();
break;
default:
break;
}
}
@ -589,6 +595,8 @@ hlULongLong CDirectoryFolder::GetSizeOnDiskEx(hlBool bRecurse) const
case HL_ITEM_FILE:
uiSize += static_cast<hlULongLong>(static_cast<const CDirectoryFile *>(pItem)->GetSizeOnDisk());
break;
default:
break;
}
}
@ -611,6 +619,8 @@ hlUInt CDirectoryFolder::GetFolderCount(hlBool bRecurse) const
uiCount += static_cast<const CDirectoryFolder *>(pItem)->GetFolderCount(bRecurse);
}
break;
default:
break;
}
}
@ -635,6 +645,8 @@ hlUInt CDirectoryFolder::GetFileCount(hlBool bRecurse) const
case HL_ITEM_FILE:
uiCount++;
break;
default:
break;
}
}

View File

@ -789,6 +789,8 @@ hlBool CGCFFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
}
return hlTrue;
}
default:
break;
}
break;
}
@ -819,9 +821,13 @@ hlBool CGCFFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
}
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -153,6 +153,8 @@ HLLIB_API hlBool hlGetBooleanValidate(HLOption eOption, hlBool *pValue)
case HL_PACKAGE_BOUND:
*pValue = pPackage != 0;
return hlTrue;
default:
break;
}
return hlFalse;
@ -171,6 +173,8 @@ HLLIB_API hlVoid hlSetBoolean(HLOption eOption, hlBool bValue)
case HL_FORCE_DEFRAGMENT:
bForceDefragment = bValue;
break;
default:
break;
}
}
@ -533,6 +537,8 @@ HLLIB_API hlVoid hlSetVoid(HLOption eOption, const hlVoid *pValue)
case HL_PROC_DEFRAGMENT_PROGRESS_EX:
pDefragmentProgressExProc = (PDefragmentProgressExProc)pValue;
break;
default:
break;
}
}

View File

@ -347,6 +347,8 @@ hlBool CNCFFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFile->GetID()].uiDirectoryFlags, hlTrue);
return hlTrue;
}
default:
break;
}
break;
}
@ -360,9 +362,13 @@ hlBool CNCFFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFolder->GetID()].uiDirectoryFlags, hlTrue);
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -422,6 +422,8 @@ hlBool CVBSPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackag
delete []lpComment;
return hlTrue;
}
default:
break;
}
}
else
@ -444,6 +446,8 @@ hlBool CVBSPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackag
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], *(hlUInt *)this->pHeader->lpLumps[uiID].lpFourCC, hlTrue);
return hlTrue;
}
default:
break;
}
if(this->pEndOfCentralDirectoryRecord != 0 && pItem->GetID() == HL_VBSP_LUMP_PAKFILE)
@ -466,11 +470,15 @@ hlBool CVBSPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackag
delete []lpComment;
return hlTrue;
}
default:
break;
}
}
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -405,9 +405,13 @@ hlBool CVPKFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], pDirectoryItem->pDirectoryEntry->uiCRC, hlTrue);
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -200,9 +200,13 @@ hlBool CWADFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], (hlUInt)pLump->iType, hlTrue);
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -299,9 +299,13 @@ hlBool CXZPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], uiSize, hlFalse);
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;

View File

@ -330,9 +330,13 @@ hlBool CZIPFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
delete []lpComment;
return hlTrue;
}
default:
break;
}
break;
}
default:
break;
}
return hlFalse;