T2345: Replace instances of NULL with nullptr

The following changes have been applied to src and lib folders:
regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib)
Manually find/change: (void \*) nullptr ⇒ nullptr (1 case)
regex find: ".*?nullptr.*?"
  Manually ~14 cases back to "NULL" in src, ~2 in lib
  regex finds a few false positive where nullptr appears between two
  strings in a function call
This commit is contained in:
Anne Gunn
2020-09-11 07:39:46 -06:00
parent 101d39142e
commit f1ef7d85a8
1217 changed files with 8531 additions and 8531 deletions

View File

@ -367,7 +367,7 @@ namespace ATC {
const string & regulatorPrefix) :
RegulatorShapeFunction(thermostat,regulatorPrefix),
mdMassMatrix_(atc_->set_mass_mat_md(TEMPERATURE)),
atomVelocities_(NULL)
atomVelocities_(nullptr)
{
fieldMask_(TEMPERATURE,FLUX) = true;
lambda_ = atomicRegulator_->regulator_data(regulatorPrefix_+"LambdaEnergy",1); // data associated with stage 3 in ATC_Method::initialize
@ -425,7 +425,7 @@ namespace ATC {
ThermostatRescale::ThermostatRescale(AtomicRegulator * thermostat) :
ThermostatShapeFunction(thermostat),
nodalTemperature_(atc_->field(TEMPERATURE)),
atomVelocityRescalings_(NULL)
atomVelocityRescalings_(nullptr)
{
// do nothing
}
@ -535,7 +535,7 @@ namespace ATC {
//--------------------------------------------------------
ThermostatRescaleMixedKePe::ThermostatRescaleMixedKePe(AtomicRegulator * thermostat) :
ThermostatRescale(thermostat),
nodalAtomicFluctuatingPotentialEnergy_(NULL)
nodalAtomicFluctuatingPotentialEnergy_(nullptr)
{
// do nothing
}
@ -607,7 +607,7 @@ namespace ATC {
const string & regulatorPrefix) :
RegulatorShapeFunction(thermostat,regulatorPrefix),
lambdaMaxIterations_(lambdaMaxIterations),
rhsLambdaSquared_(NULL),
rhsLambdaSquared_(nullptr),
dtFactor_(1.)
{
fieldMask_(TEMPERATURE,FLUX) = true;
@ -741,21 +741,21 @@ namespace ATC {
int /* lambdaMaxIterations */,
const string & regulatorPrefix) :
RegulatorMethod(thermostat,regulatorPrefix),
lambdaSolver_(NULL),
lambdaSolver_(nullptr),
mdMassMatrix_(atc_->set_mass_mat_md(TEMPERATURE)),
atomVelocities_(NULL),
atomVelocities_(nullptr),
temperature_(atc_->field(TEMPERATURE)),
timeFilter_(atomicRegulator_->time_filter()),
nodalAtomicLambdaPower_(NULL),
lambdaPowerFiltered_(NULL),
atomLambdas_(NULL),
atomThermostatForces_(NULL),
atomMasses_(NULL),
nodalAtomicLambdaPower_(nullptr),
lambdaPowerFiltered_(nullptr),
atomLambdas_(nullptr),
atomThermostatForces_(nullptr),
atomMasses_(nullptr),
isFirstTimestep_(true),
nodalAtomicEnergy_(NULL),
atomPredictedVelocities_(NULL),
nodalAtomicPredictedEnergy_(NULL),
firstHalfAtomForces_(NULL)
nodalAtomicEnergy_(nullptr),
atomPredictedVelocities_(nullptr),
nodalAtomicPredictedEnergy_(nullptr),
firstHalfAtomForces_(nullptr)
{
// construct/obtain data corresponding to stage 3 of ATC_Method::initialize
nodalAtomicLambdaPower_ = thermostat->regulator_data(regulatorPrefix_+"NodalAtomicLambdaPower",1);
@ -1389,7 +1389,7 @@ namespace ATC {
int lambdaMaxIterations,
const string & regulatorPrefix) :
ThermostatGlcFs(thermostat,lambdaMaxIterations,regulatorPrefix),
atomThermostatForcesPredVel_(NULL),
atomThermostatForcesPredVel_(nullptr),
filterCoefficient_(1.)
{
lambdaSolver_ = new ThermostatSolverFixed(thermostat,
@ -1887,9 +1887,9 @@ namespace ATC {
int lambdaMaxIterations,
bool constructThermostats) :
RegulatorMethod(thermostat),
thermostatFlux_(NULL),
thermostatFixed_(NULL),
thermostatBcs_(NULL)
thermostatFlux_(nullptr),
thermostatFixed_(nullptr),
thermostatBcs_(nullptr)
{
if (constructThermostats) {
thermostatFlux_ = new ThermostatIntegratorFlux(thermostat,lambdaMaxIterations,regulatorPrefix_+"Flux");
@ -2022,10 +2022,10 @@ namespace ATC {
ThermostatGlc::ThermostatGlc(AtomicRegulator * thermostat) :
ThermostatShapeFunction(thermostat),
timeFilter_(atomicRegulator_->time_filter()),
lambdaPowerFiltered_(NULL),
atomThermostatForces_(NULL),
lambdaPowerFiltered_(nullptr),
atomThermostatForces_(nullptr),
prescribedDataMgr_(atc_->prescribed_data_manager()),
atomMasses_(NULL)
atomMasses_(nullptr)
{
// consistent with stage 3 of ATC_Method::initialize
lambdaPowerFiltered_= atomicRegulator_->regulator_data(regulatorPrefix_+"LambdaPowerFiltered",1);
@ -2080,8 +2080,8 @@ namespace ATC {
ThermostatGlc(thermostat),
nodalTemperatureRoc_(atc_->field_roc(TEMPERATURE)),
heatSource_(atc_->atomic_source(TEMPERATURE)),
nodalAtomicPower_(NULL),
nodalAtomicLambdaPower_(NULL)
nodalAtomicPower_(nullptr),
nodalAtomicLambdaPower_(nullptr)
{
// do nothing
}
@ -2287,8 +2287,8 @@ namespace ATC {
//--------------------------------------------------------
ThermostatHooverVerlet::ThermostatHooverVerlet(AtomicRegulator * thermostat) :
ThermostatPowerVerlet(thermostat),
lambdaHoover_(NULL),
nodalAtomicHooverLambdaPower_(NULL)
lambdaHoover_(nullptr),
nodalAtomicHooverLambdaPower_(nullptr)
{
// set up data consistent with stage 3 of ATC_Method::initialize
lambdaHoover_ = atomicRegulator_->regulator_data(regulatorPrefix_+"LambdaHoover",1);
@ -2505,8 +2505,8 @@ namespace ATC {
//--------------------------------------------------------
ThermostatHooverVerletFiltered::ThermostatHooverVerletFiltered(AtomicRegulator * thermostat) :
ThermostatPowerVerletFiltered(thermostat),
lambdaHoover_(NULL),
nodalAtomicHooverLambdaPower_(NULL)
lambdaHoover_(nullptr),
nodalAtomicHooverLambdaPower_(nullptr)
{
// consistent with stage 3 of ATC_Method::initialize
lambdaHoover_ = atomicRegulator_->regulator_data("LambdaHoover",1);