mirror of https://github.com/stella-emu/stella.git
Fixes for minor warnings from cppcheck.
This commit is contained in:
parent
a8a0c57deb
commit
f3a185f04a
|
@ -307,7 +307,7 @@ bool Playfield::save(Serializer& out) const
|
|||
out.putByte(myDebugColor);
|
||||
out.putBool(myDebugEnabled);
|
||||
|
||||
out.putByte(myColorMode);
|
||||
out.putByte(uInt8(myColorMode));
|
||||
|
||||
out.putInt(myPattern);
|
||||
out.putInt(myEffectivePattern);
|
||||
|
|
|
@ -76,7 +76,7 @@ class Playfield : public Serializable
|
|||
|
||||
private:
|
||||
|
||||
enum ColorMode: uInt8 {normal, score};
|
||||
enum class ColorMode: uInt8 {normal, score};
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -484,13 +484,13 @@ class TIA : public Device
|
|||
/**
|
||||
* During each line, the TIA cycles through these two states.
|
||||
*/
|
||||
enum HState {blank, frame};
|
||||
enum class HState {blank, frame};
|
||||
|
||||
/**
|
||||
* The three different modes of the priority encoder. Check TIA::renderPixel
|
||||
* for a precise definition.
|
||||
*/
|
||||
enum Priority {pfp, score, normal};
|
||||
enum class Priority {pfp, score, normal};
|
||||
|
||||
/**
|
||||
* Palette and indices for fixed debug colors.
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
AbstractFrameManager::AbstractFrameManager() :
|
||||
myIsRendering(false),
|
||||
myVsync(false),
|
||||
myVblank(false),
|
||||
myLayout(FrameLayout::pal),
|
||||
myOnFrameStart(nullptr),
|
||||
myOnFrameComplete(nullptr)
|
||||
|
|
|
@ -44,6 +44,7 @@ FrameLayout FrameLayoutDetector::detectedLayout() const{
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FrameLayoutDetector::FrameLayoutDetector()
|
||||
: myState(State::waitForVsyncStart)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class FrameLayoutDetector: public AbstractFrameManager {
|
|||
/**
|
||||
* This frame manager only tracks frame boundaries, so we have only two states.
|
||||
*/
|
||||
enum State {
|
||||
enum class State {
|
||||
// Wait for VSYNC to be enabled.
|
||||
waitForVsyncStart,
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class FrameManager: public AbstractFrameManager {
|
|||
|
||||
private:
|
||||
|
||||
enum State {
|
||||
enum class State {
|
||||
waitForVsyncStart,
|
||||
waitForVsyncEnd,
|
||||
waitForFrameStart,
|
||||
|
@ -75,7 +75,7 @@ class FrameManager: public AbstractFrameManager {
|
|||
|
||||
private:
|
||||
|
||||
void setState(State state);
|
||||
void setState(State state);
|
||||
|
||||
void updateIsRendering();
|
||||
|
||||
|
|
|
@ -48,6 +48,9 @@ enum Metrics: uInt32 {
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
YStartDetector::YStartDetector()
|
||||
: myState(State::waitForVsyncStart),
|
||||
myVblankMode(VblankMode::floating),
|
||||
myVblankViolated(false)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class YStartDetector: public AbstractFrameManager {
|
|||
/**
|
||||
* Our various states.
|
||||
*/
|
||||
enum State {
|
||||
enum class State {
|
||||
// Wait for vsync on
|
||||
waitForVsyncStart,
|
||||
|
||||
|
@ -78,7 +78,7 @@ class YStartDetector: public AbstractFrameManager {
|
|||
/**
|
||||
* Have we settled on a frame start?
|
||||
*/
|
||||
enum VblankMode {
|
||||
enum class VblankMode {
|
||||
// We have settled on a frame start and have some hysteresis before we return to floating
|
||||
locked,
|
||||
|
||||
|
|
Loading…
Reference in New Issue