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:
@ -26,13 +26,13 @@ namespace ATC {
|
||||
//====================================================================
|
||||
// UXT_Function_Mgr
|
||||
//====================================================================
|
||||
UXT_Function_Mgr * UXT_Function_Mgr::myInstance_ = NULL;
|
||||
UXT_Function_Mgr * UXT_Function_Mgr::myInstance_ = nullptr;
|
||||
// -----------------------------------------------------------------
|
||||
// instance()
|
||||
// -----------------------------------------------------------------
|
||||
UXT_Function_Mgr * UXT_Function_Mgr::instance()
|
||||
{
|
||||
if (myInstance_ == NULL) {
|
||||
if (myInstance_ == nullptr) {
|
||||
myInstance_ = new UXT_Function_Mgr();
|
||||
}
|
||||
return myInstance_;
|
||||
@ -90,7 +90,7 @@ namespace ATC {
|
||||
{
|
||||
string tag = other->tag();
|
||||
|
||||
UXT_Function * returnFunction = NULL;
|
||||
UXT_Function * returnFunction = nullptr;
|
||||
if (tag=="linear") {
|
||||
ScalarLinearFunction * other_cast = (ScalarLinearFunction*) other;
|
||||
returnFunction = new ScalarLinearFunction(*other_cast);
|
||||
@ -144,14 +144,14 @@ namespace ATC {
|
||||
// XT_Function_Mgr
|
||||
//--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL;
|
||||
XT_Function_Mgr * XT_Function_Mgr::myInstance_ = nullptr;
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// instance()
|
||||
// -----------------------------------------------------------------
|
||||
XT_Function_Mgr * XT_Function_Mgr::instance()
|
||||
{
|
||||
if (myInstance_ == NULL) {
|
||||
if (myInstance_ == nullptr) {
|
||||
myInstance_ = new XT_Function_Mgr();
|
||||
}
|
||||
return myInstance_;
|
||||
@ -227,7 +227,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL;
|
||||
{
|
||||
string tag = other->tag();
|
||||
|
||||
XT_Function * returnFunction = NULL;
|
||||
XT_Function * returnFunction = nullptr;
|
||||
if (tag=="linear") {
|
||||
LinearFunction * other_cast = (LinearFunction*) other;
|
||||
returnFunction = new LinearFunction(*other_cast);
|
||||
|
||||
Reference in New Issue
Block a user