pick nits

This commit is contained in:
James Alan Nguyen 2022-05-17 11:42:10 +10:00
parent ec80a2218c
commit fe11ec3877
2 changed files with 32 additions and 18 deletions

View file

@ -1925,37 +1925,51 @@ std::vector<DivInstrument*> DivEngine::instrumentFromFile(const char* path) {
} }
switch (format) { switch (format) {
case DIV_INSFORMAT_DMP: loadDMP(reader,ret,stripPath); case DIV_INSFORMAT_DMP:
loadDMP(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_TFI: loadTFI(reader,ret,stripPath); case DIV_INSFORMAT_TFI:
loadTFI(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_VGI: loadVGI(reader,ret,stripPath); case DIV_INSFORMAT_VGI:
loadVGI(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_FTI: // TODO case DIV_INSFORMAT_FTI: // TODO
break; break;
case DIV_INSFORMAT_BTI: // TODO case DIV_INSFORMAT_BTI: // TODO
break; break;
case DIV_INSFORMAT_S3I: loadS3I(reader,ret,stripPath); case DIV_INSFORMAT_S3I:
loadS3I(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_SBI: loadSBI(reader,ret,stripPath); case DIV_INSFORMAT_SBI:
loadSBI(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_OPLI: loadOPLI(reader,ret,stripPath); case DIV_INSFORMAT_OPLI:
loadOPLI(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_OPNI: loadOPNI(reader,ret,stripPath); case DIV_INSFORMAT_OPNI:
loadOPNI(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_Y12: loadY12(reader,ret,stripPath); case DIV_INSFORMAT_Y12:
loadY12(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_BNK: loadBNK(reader,ret,stripPath); case DIV_INSFORMAT_BNK:
loadBNK(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_FF: loadFF(reader,ret,stripPath); case DIV_INSFORMAT_FF:
loadFF(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_GYB: loadGYB(reader,ret,stripPath); case DIV_INSFORMAT_GYB:
loadGYB(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_OPM: loadOPM(reader,ret,stripPath); case DIV_INSFORMAT_OPM:
loadOPM(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_WOPL: loadWOPL(reader,ret,stripPath); case DIV_INSFORMAT_WOPL:
loadWOPL(reader,ret,stripPath);
break; break;
case DIV_INSFORMAT_WOPN: loadWOPN(reader,ret,stripPath); case DIV_INSFORMAT_WOPN:
loadWOPN(reader,ret,stripPath);
break; break;
} }

View file

@ -171,7 +171,7 @@ String SafeReader::readStringLine() {
if (isEOF()) throw EndOfFileException(this, len); if (isEOF()) throw EndOfFileException(this, len);
while (!isEOF() && (c=readC())!=0) { while (!isEOF() && (c=readC())!=0) {
if (c=='\r'||c=='\n') { if (c=='\r' || c=='\n') {
break; break;
} }
ret.push_back(c); ret.push_back(c);
@ -185,11 +185,11 @@ String SafeReader::readStringToken(unsigned char delim, bool stripContiguous) {
if (isEOF()) throw EndOfFileException(this, len); if (isEOF()) throw EndOfFileException(this, len);
while (!isEOF() && (c=readC())!=0) { while (!isEOF() && (c=readC())!=0) {
if (c == '\r' || c == '\n') { if (c=='\r' || c=='\n') {
break; break;
} }
if (c == delim) { if (c==delim) {
if (ret.length() == 0 && stripContiguous) { if (ret.length()==0 && stripContiguous) {
continue; continue;
} }
break; break;