C++11: modernize use nullptr (replaces NULL or 0)
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
#include "KeyboardP.h"
|
||||
|
||||
using namespace SIM::Coin3D::Quarter;
|
||||
QuarterP::StateCursorMap * QuarterP::statecursormap = NULL;
|
||||
QuarterP::StateCursorMap * QuarterP::statecursormap = nullptr;
|
||||
|
||||
QuarterP::QuarterP(void)
|
||||
QuarterP::QuarterP()
|
||||
{
|
||||
this->sensormanager = new SensorManager;
|
||||
this->imagereader = new ImageReader;
|
||||
assert(QuarterP::statecursormap == NULL);
|
||||
assert(QuarterP::statecursormap == nullptr);
|
||||
QuarterP::statecursormap = new StateCursorMap;
|
||||
|
||||
}
|
||||
@@ -20,17 +20,17 @@ QuarterP::~QuarterP()
|
||||
delete this->imagereader;
|
||||
delete this->sensormanager;
|
||||
|
||||
assert(QuarterP::statecursormap != NULL);
|
||||
assert(QuarterP::statecursormap != nullptr);
|
||||
delete QuarterP::statecursormap;
|
||||
|
||||
// FIXME: Why not use an atexit mechanism for this?
|
||||
if (KeyboardP::keyboardmap != NULL) {
|
||||
if (KeyboardP::keyboardmap != nullptr) {
|
||||
KeyboardP::keyboardmap->clear();
|
||||
KeyboardP::keypadmap->clear();
|
||||
delete KeyboardP::keyboardmap;
|
||||
delete KeyboardP::keypadmap;
|
||||
KeyboardP::keyboardmap = NULL;
|
||||
KeyboardP::keypadmap = NULL;
|
||||
KeyboardP::keyboardmap = nullptr;
|
||||
KeyboardP::keypadmap = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user