Fix issues with VS project, minor warning from clang, and autoformat

code.
This commit is contained in:
Stephen Anthony 2019-11-02 11:03:15 -02:30
parent c198edbe51
commit e0f7051e5c
3 changed files with 118 additions and 116 deletions

View File

@ -22,9 +22,9 @@
CartridgeFC::CartridgeFC(const ByteBuffer& image, size_t size, CartridgeFC::CartridgeFC(const ByteBuffer& image, size_t size,
const string& md5, const Settings& settings) const string& md5, const Settings& settings)
: Cartridge(settings, md5), : Cartridge(settings, md5),
mySize(size),
myBankOffset(0), myBankOffset(0),
myCurrentBank(0), myCurrentBank(0),
mySize(size),
myTargetBank(0) myTargetBank(0)
{ {
// Copy the ROM image into my buffer // Copy the ROM image into my buffer

View File

@ -22,8 +22,9 @@ class System;
#include "bspf.hxx" #include "bspf.hxx"
#include "Cart.hxx" #include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
#include "CartFCWidget.hxx" #include "CartFCWidget.hxx"
#endif #endif
/** /**
@ -38,7 +39,7 @@ class CartridgeFC : public Cartridge
{ {
friend class CartridgeFCWidget; friend class CartridgeFCWidget;
public: public:
/** /**
Create a new cartridge using the specified image Create a new cartridge using the specified image
@ -51,7 +52,7 @@ public:
const Settings& settings); const Settings& settings);
virtual ~CartridgeFC() = default; virtual ~CartridgeFC() = default;
public: public:
/** /**
Reset device to its power-on state Reset device to its power-on state
*/ */
@ -124,7 +125,7 @@ public:
*/ */
string name() const override { return "CartridgeFC"; } string name() const override { return "CartridgeFC"; }
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
/** /**
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
@ -134,9 +135,9 @@ public:
{ {
return new CartridgeFCWidget(boss, lfont, nfont, x, y, w, h, *this); return new CartridgeFCWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif
public: public:
/** /**
Get the byte at the specified address. Get the byte at the specified address.
@ -153,25 +154,23 @@ public:
*/ */
bool poke(uInt16 address, uInt8 value) override; bool poke(uInt16 address, uInt8 value) override;
private: private:
// The 32K ROM image of the cartridge // The 32K ROM image of the cartridge
std::array<uInt8, 32_KB> myImage; std::array<uInt8, 32_KB> myImage;
// Size of the ROM image // Size of the ROM image
size_t mySize; size_t mySize;
// Indicates the offset into the ROM image (aligns to current bank) // Indicates the offset into the ROM image (aligns to current bank)
uInt16 myBankOffset; uInt16 myBankOffset;
// Indicates which bank is currently active for the first segment // Indicates which bank is currently active for the first segment
uInt16 myCurrentBank; uInt16 myCurrentBank;
// Target bank defined by writing to $1FF8/9 // Target bank defined by writing to $1FF8/9
uInt16 myTargetBank; uInt16 myTargetBank;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported
CartridgeFC() = delete; CartridgeFC() = delete;
CartridgeFC(const CartridgeFC&) = delete; CartridgeFC(const CartridgeFC&) = delete;
@ -181,4 +180,3 @@ private:
}; };
#endif #endif

View File

@ -436,6 +436,7 @@
<ClCompile Include="..\debugger\gui\CartF8Widget.cxx" /> <ClCompile Include="..\debugger\gui\CartF8Widget.cxx" />
<ClCompile Include="..\debugger\gui\CartFA2Widget.cxx" /> <ClCompile Include="..\debugger\gui\CartFA2Widget.cxx" />
<ClCompile Include="..\debugger\gui\CartFAWidget.cxx" /> <ClCompile Include="..\debugger\gui\CartFAWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartFCWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartFEWidget.cxx" /> <ClCompile Include="..\debugger\gui\CartFEWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartMDMWidget.cxx" /> <ClCompile Include="..\debugger\gui\CartMDMWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartMNetworkWidget.cxx" /> <ClCompile Include="..\debugger\gui\CartMNetworkWidget.cxx" />
@ -471,6 +472,7 @@
<ClCompile Include="..\emucore\CartDF.cxx" /> <ClCompile Include="..\emucore\CartDF.cxx" />
<ClCompile Include="..\emucore\CartDFSC.cxx" /> <ClCompile Include="..\emucore\CartDFSC.cxx" />
<ClCompile Include="..\emucore\CartFA2.cxx" /> <ClCompile Include="..\emucore\CartFA2.cxx" />
<ClCompile Include="..\emucore\CartFC.cxx" />
<ClCompile Include="..\emucore\CartMDM.cxx" /> <ClCompile Include="..\emucore\CartMDM.cxx" />
<ClCompile Include="..\emucore\CartMNetwork.cxx" /> <ClCompile Include="..\emucore\CartMNetwork.cxx" />
<ClCompile Include="..\emucore\CartE78K.cxx" /> <ClCompile Include="..\emucore\CartE78K.cxx" />
@ -1142,6 +1144,7 @@
<ClInclude Include="..\debugger\gui\CartF8Widget.hxx" /> <ClInclude Include="..\debugger\gui\CartF8Widget.hxx" />
<ClInclude Include="..\debugger\gui\CartFA2Widget.hxx" /> <ClInclude Include="..\debugger\gui\CartFA2Widget.hxx" />
<ClInclude Include="..\debugger\gui\CartFAWidget.hxx" /> <ClInclude Include="..\debugger\gui\CartFAWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartFCWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartFEWidget.hxx" /> <ClInclude Include="..\debugger\gui\CartFEWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartMDMWidget.hxx" /> <ClInclude Include="..\debugger\gui\CartMDMWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartMNetworkWidget.hxx" /> <ClInclude Include="..\debugger\gui\CartMNetworkWidget.hxx" />
@ -1183,6 +1186,7 @@
<ClInclude Include="..\emucore\CartDF.hxx" /> <ClInclude Include="..\emucore\CartDF.hxx" />
<ClInclude Include="..\emucore\CartDFSC.hxx" /> <ClInclude Include="..\emucore\CartDFSC.hxx" />
<ClInclude Include="..\emucore\CartFA2.hxx" /> <ClInclude Include="..\emucore\CartFA2.hxx" />
<ClInclude Include="..\emucore\CartFC.hxx" />
<ClInclude Include="..\emucore\CartMDM.hxx" /> <ClInclude Include="..\emucore\CartMDM.hxx" />
<ClInclude Include="..\emucore\CartMNetwork.hxx" /> <ClInclude Include="..\emucore\CartMNetwork.hxx" />
<ClInclude Include="..\emucore\CartE78K.hxx" /> <ClInclude Include="..\emucore\CartE78K.hxx" />