mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 11:35:38 -04:00
[libromdata] ISO, IsoPartition: Simplify the Joliet escape sequence parser a bit.
This commit is contained in:
parent
6e7d57282f
commit
4342ce8a1b
@ -340,25 +340,24 @@ void ISOPrivate::checkVolumeDescriptors(void)
|
||||
|
||||
// Check if this is a valid UCS-2 level seqeunce.
|
||||
// NOTE: Using the highest level specified.
|
||||
JolietSVDType newType = JolietSVDType::None;
|
||||
switch (p[2]) {
|
||||
case '@':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level1) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level1;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level1;
|
||||
break;
|
||||
case 'C':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level2) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level2;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level2;
|
||||
break;
|
||||
case 'E':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level3) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level3;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (jolietSVDType < newType) {
|
||||
jolietSVDType = newType;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -225,25 +225,24 @@ IsoPartitionPrivate::IsoPartitionPrivate(IsoPartition *q,
|
||||
|
||||
// Check if this is a valid UCS-2 level seqeunce.
|
||||
// NOTE: Using the highest level specified.
|
||||
JolietSVDType newType = JolietSVDType::None;
|
||||
switch (p[2]) {
|
||||
case '@':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level1) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level1;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level1;
|
||||
break;
|
||||
case 'C':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level2) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level2;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level2;
|
||||
break;
|
||||
case 'E':
|
||||
if (jolietSVDType < JolietSVDType::UCS2_Level3) {
|
||||
jolietSVDType = JolietSVDType::UCS2_Level3;
|
||||
}
|
||||
newType = JolietSVDType::UCS2_Level3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (jolietSVDType < newType) {
|
||||
jolietSVDType = newType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user