aboutsummaryrefslogtreecommitdiff
path: root/DvdLib
diff options
context:
space:
mode:
authortelans <telans@protonmail.com>2020-06-20 20:35:29 +1200
committertelans <telans@protonmail.com>2020-06-20 20:35:29 +1200
commit98db8f72e01b608e6c384ecf5b107fc2d105b652 (patch)
tree8099ba47507cfa9f1ff9b6e456cf854108298a63 /DvdLib
parent8e3d8748021fe0336e2fc1211810cc9bbe2c8850 (diff)
fix SA1503 for one line if statements
Diffstat (limited to 'DvdLib')
-rw-r--r--DvdLib/Ifo/Dvd.cs16
-rw-r--r--DvdLib/Ifo/DvdTime.cs10
-rw-r--r--DvdLib/Ifo/ProgramChain.cs11
-rw-r--r--DvdLib/Ifo/Title.cs5
4 files changed, 34 insertions, 8 deletions
diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs
index ca20baa73..361319625 100644
--- a/DvdLib/Ifo/Dvd.cs
+++ b/DvdLib/Ifo/Dvd.cs
@@ -117,12 +117,19 @@ namespace DvdLib.Ifo
uint chapNum = 1;
vtsFs.Seek(baseAddr + offsets[titleNum], SeekOrigin.Begin);
var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1));
- if (t == null) continue;
+ if (t == null)
+ {
+ continue;
+ }
do
{
t.Chapters.Add(new Chapter(vtsRead.ReadUInt16(), vtsRead.ReadUInt16(), chapNum));
- if (titleNum + 1 < numTitles && vtsFs.Position == (baseAddr + offsets[titleNum + 1])) break;
+ if (titleNum + 1 < numTitles && vtsFs.Position == (baseAddr + offsets[titleNum + 1]))
+ {
+ break;
+ }
+
chapNum++;
}
while (vtsFs.Position < (baseAddr + endaddr));
@@ -147,7 +154,10 @@ namespace DvdLib.Ifo
uint vtsPgcOffset = vtsRead.ReadUInt32();
var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum));
- if (t != null) t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum);
+ if (t != null)
+ {
+ t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum);
+ }
}
}
}
diff --git a/DvdLib/Ifo/DvdTime.cs b/DvdLib/Ifo/DvdTime.cs
index 978af90c2..d23140610 100644
--- a/DvdLib/Ifo/DvdTime.cs
+++ b/DvdLib/Ifo/DvdTime.cs
@@ -15,8 +15,14 @@ namespace DvdLib.Ifo
Second = GetBCDValue(data[2]);
Frames = GetBCDValue((byte)(data[3] & 0x3F));
- if ((data[3] & 0x80) != 0) FrameRate = 30;
- else if ((data[3] & 0x40) != 0) FrameRate = 25;
+ if ((data[3] & 0x80) != 0)
+ {
+ FrameRate = 30;
+ }
+ else if ((data[3] & 0x40) != 0)
+ {
+ FrameRate = 25;
+ }
}
private static byte GetBCDValue(byte data)
diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs
index 8048f4bbd..83c0051b9 100644
--- a/DvdLib/Ifo/ProgramChain.cs
+++ b/DvdLib/Ifo/ProgramChain.cs
@@ -75,8 +75,15 @@ namespace DvdLib.Ifo
StillTime = br.ReadByte();
byte pbMode = br.ReadByte();
- if (pbMode == 0) PlaybackMode = ProgramPlaybackMode.Sequential;
- else PlaybackMode = ((pbMode & 0x80) == 0) ? ProgramPlaybackMode.Random : ProgramPlaybackMode.Shuffle;
+ if (pbMode == 0)
+ {
+ PlaybackMode = ProgramPlaybackMode.Sequential;
+ }
+ else
+ {
+ PlaybackMode = ((pbMode & 0x80) == 0) ? ProgramPlaybackMode.Random : ProgramPlaybackMode.Shuffle;
+ }
+
ProgramCount = (uint)(pbMode & 0x7F);
Palette = br.ReadBytes(64);
diff --git a/DvdLib/Ifo/Title.cs b/DvdLib/Ifo/Title.cs
index 4af3af754..29a0b95c7 100644
--- a/DvdLib/Ifo/Title.cs
+++ b/DvdLib/Ifo/Title.cs
@@ -59,7 +59,10 @@ namespace DvdLib.Ifo
var pgc = new ProgramChain(pgcNum);
pgc.ParseHeader(br);
ProgramChains.Add(pgc);
- if (entryPgc) EntryProgramChain = pgc;
+ if (entryPgc)
+ {
+ EntryProgramChain = pgc;
+ }
br.BaseStream.Seek(curPos, SeekOrigin.Begin);
}