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); hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], uiPaletteSize, hlFalse);
return hlTrue; return hlTrue;
} }
default:
break;
} }
} }
break; break;
} }
default:
break;
} }
return hlFalse; return hlFalse;

View File

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

View File

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

View File

@ -153,6 +153,8 @@ HLLIB_API hlBool hlGetBooleanValidate(HLOption eOption, hlBool *pValue)
case HL_PACKAGE_BOUND: case HL_PACKAGE_BOUND:
*pValue = pPackage != 0; *pValue = pPackage != 0;
return hlTrue; return hlTrue;
default:
break;
} }
return hlFalse; return hlFalse;
@ -171,6 +173,8 @@ HLLIB_API hlVoid hlSetBoolean(HLOption eOption, hlBool bValue)
case HL_FORCE_DEFRAGMENT: case HL_FORCE_DEFRAGMENT:
bForceDefragment = bValue; bForceDefragment = bValue;
break; break;
default:
break;
} }
} }
@ -533,6 +537,8 @@ HLLIB_API hlVoid hlSetVoid(HLOption eOption, const hlVoid *pValue)
case HL_PROC_DEFRAGMENT_PROGRESS_EX: case HL_PROC_DEFRAGMENT_PROGRESS_EX:
pDefragmentProgressExProc = (PDefragmentProgressExProc)pValue; pDefragmentProgressExProc = (PDefragmentProgressExProc)pValue;
break; 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); hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFile->GetID()].uiDirectoryFlags, hlTrue);
return hlTrue; return hlTrue;
} }
default:
break;
} }
break; break;
} }
@ -360,9 +362,13 @@ hlBool CNCFFile::GetItemAttributeInternal(const CDirectoryItem *pItem, HLPackage
hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFolder->GetID()].uiDirectoryFlags, hlTrue); hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFolder->GetID()].uiDirectoryFlags, hlTrue);
return hlTrue; return hlTrue;
} }
default:
break;
} }
break; break;
} }
default:
break;
} }
return hlFalse; return hlFalse;

View File

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

View File

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

View File

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

View File

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

View File

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