mirror of https://github.com/stella-emu/stella.git
A few more nullptr and unique_ptr fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3037 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
3949101fb7
commit
03f760cceb
|
@ -24,10 +24,9 @@
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SaveKey::SaveKey(Jack jack, const Event& event, const System& system,
|
||||
const string& eepromfile)
|
||||
: Controller(jack, event, system, Controller::SaveKey),
|
||||
myEEPROM(NULL)
|
||||
: Controller(jack, event, system, Controller::SaveKey)
|
||||
{
|
||||
myEEPROM = new MT24LC256(eepromfile, system);
|
||||
myEEPROM = make_ptr<MT24LC256>(eepromfile, system);
|
||||
|
||||
myDigitalPinState[One] = myDigitalPinState[Two] = true;
|
||||
myAnalogPinValue[Five] = myAnalogPinValue[Nine] = maximumResistance;
|
||||
|
@ -36,7 +35,6 @@ SaveKey::SaveKey(Jack jack, const Event& event, const System& system,
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SaveKey::~SaveKey()
|
||||
{
|
||||
delete myEEPROM;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -91,7 +91,7 @@ class SaveKey : public Controller
|
|||
|
||||
private:
|
||||
// The EEPROM used in the SaveKey
|
||||
MT24LC256* myEEPROM;
|
||||
unique_ptr<MT24LC256> myEEPROM;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,15 +31,15 @@
|
|||
TIASurface::TIASurface(OSystem& system)
|
||||
: myOSystem(system),
|
||||
myFB(system.frameBuffer()),
|
||||
myTIA(NULL),
|
||||
myTiaSurface(NULL),
|
||||
mySLineSurface(NULL),
|
||||
myBaseTiaSurface(NULL),
|
||||
myTIA(nullptr),
|
||||
myTiaSurface(nullptr),
|
||||
mySLineSurface(nullptr),
|
||||
myBaseTiaSurface(nullptr),
|
||||
myFilterType(kNormal),
|
||||
myUsePhosphor(false),
|
||||
myPhosphorBlend(77),
|
||||
myScanlinesEnabled(false),
|
||||
myPalette(NULL)
|
||||
myPalette(nullptr)
|
||||
{
|
||||
// Load NTSC filter settings
|
||||
myNTSCFilter.loadConfig(myOSystem.settings());
|
||||
|
|
Loading…
Reference in New Issue