Fix minor warnings from clang.

This commit is contained in:
Stephen Anthony 2023-09-23 18:34:02 -02:30
parent b2004d0c49
commit 85f2304443
1 changed files with 7 additions and 8 deletions

View File

@ -113,7 +113,7 @@ class StreamReader : public Serializable
// padding // padding
}; };
FrameFormat* ff = (FrameFormat* )offset; const FrameFormat* ff = reinterpret_cast<FrameFormat*>(offset);
if (ff->format & 0x80) if (ff->format & 0x80)
{ {
@ -125,9 +125,9 @@ class StreamReader : public Serializable
int totalLines = myVSyncLines + myBlankLines + myOverscanLines + myVisibleLines; int totalLines = myVSyncLines + myBlankLines + myOverscanLines + myVisibleLines;
myAudio = (uInt8*)(&ff->dataStart); myAudio = const_cast<uInt8*>(&ff->dataStart);
myGraph = myAudio + totalLines; myGraph = myAudio + totalLines;
myColor = ((uInt8*)myGraph) + 5 * myVisibleLines; myColor = const_cast<uInt8*>(myGraph) + 5 * myVisibleLines;
myColorBK = myColor + 5 * myVisibleLines; myColorBK = myColor + 5 * myVisibleLines;
myTimecode = myColorBK + 1 * myVisibleLines; myTimecode = myColorBK + 1 * myVisibleLines;
} }
@ -143,8 +143,8 @@ class StreamReader : public Serializable
myAudio = offset + 4 + 3; myAudio = offset + 4 + 3;
myGraph = myAudio + totalLines; myGraph = myAudio + totalLines;
myTimecode = ((uInt8*)myGraph) + 5*myVisibleLines; myTimecode = const_cast<uInt8*>(myGraph) + 5 * myVisibleLines;
myColor = ((uInt8*)myTimecode) + 60; myColor = const_cast<uInt8*>(myTimecode) + 60;
myColorBK = myColor + 5*myVisibleLines; myColorBK = myColor + 5*myVisibleLines;
} }
@ -927,8 +927,7 @@ bool MovieCart::init(string_view path)
return true; return true;
} }
#define RAINBOW_HEIGHT 30 static constexpr uInt8 RAINBOW_HEIGHT = 30, TITLE_HEIGHT = 12;
#define TITLE_HEIGHT 12
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void MovieCart::setConsoleTiming(ConsoleTiming timing) void MovieCart::setConsoleTiming(ConsoleTiming timing)