本文整理汇总了C++中StringSet::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ StringSet::Reset方法的具体用法?C++ StringSet::Reset怎么用?C++ StringSet::Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringSet
的用法示例。
在下文中一共展示了StringSet::Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BzipOpen
int BzipOpen(bool bootApp)
{
int nMemLen; // Zip name number
nZipsFound = 0; // Haven't found zips yet
nTotalSize = 0;
if (szBzipName == NULL) {
return 1;
}
BzipClose(); // Make sure nothing is open
if(!bootApp) { // reset information strings
BzipText.Reset();
BzipDetail.Reset();
}
// Count the number of roms needed
for (nRomCount = 0; ; nRomCount++) {
if (BurnDrvGetRomInfo(NULL, nRomCount)) {
break;
}
}
if (nRomCount <= 0) {
return 1;
}
// Create an array for holding lookups for each rom -> zip entries
nMemLen = nRomCount * sizeof(struct RomFind);
RomFind = (struct RomFind*)malloc(nMemLen);
if (RomFind == NULL) {
return 1;
}
memset(RomFind, 0, nMemLen);
for (int z = 0; z < BZIP_MAX; z++) {
char* szName = NULL;
if (BurnDrvGetZipName(&szName, z)) {
break;
}
for (int d = 0; d < DIRS_MAX; d++) {
free(szBzipName[z]);
szBzipName[z] = (TCHAR*)malloc(MAX_PATH * sizeof(TCHAR));
_stprintf(szBzipName[z], _T("%s%hs"), szAppRomPaths[d], szName);
if (ZipOpen(TCHARToANSI(szBzipName[z], NULL, 0)) == 0) { // Open the rom zip file
nZipsFound++;
nCurrentZip = z;
break;
}
}
if (nCurrentZip >= 0) {
if (!bootApp) {
BzipText.Add(_T("Found %s;\n"), szBzipName[z]);
}
ZipGetList(&List, &nListCount); // Get the list of entries
for (int i = 0; i < nRomCount; i++) {
struct BurnRomInfo ri;
int nFind;
if (RomFind[i].nState == 1) { // Already found this and it's okay
continue;
}
memset(&ri, 0, sizeof(ri));
nFind = FindRom(i);
if (nFind < 0) { // Couldn't find this rom at all
continue;
}
RomFind[i].nZip = z; // Remember which zip file it is in
RomFind[i].nPos = nFind;
RomFind[i].nState = 1; // Set to found okay
BurnDrvGetRomInfo(&ri, i); // Get info about the rom
if ((ri.nType & BRF_OPT) == 0 && (ri.nType & BRF_NODUMP) == 0) {
nTotalSize += ri.nLen;
}
if (List[nFind].nLen == ri.nLen) {
if (ri.nCrc) { // If we know the CRC
if (List[nFind].nCrc != ri.nCrc) { // Length okay, but CRC wrong
RomFind[i].nState = 2;
}
}
} else {
if (List[nFind].nLen < ri.nLen) {
RomFind[i].nState = 3; // Too small
} else {
RomFind[i].nState = 4; // Too big
}
//.........这里部分代码省略.........