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:
stephena 2014-11-03 17:36:28 +00:00
parent 3949101fb7
commit 03f760cceb
3 changed files with 8 additions and 10 deletions

View File

@ -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;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -91,7 +91,7 @@ class SaveKey : public Controller
private:
// The EEPROM used in the SaveKey
MT24LC256* myEEPROM;
unique_ptr<MT24LC256> myEEPROM;
};
#endif

View File

@ -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());