Commit b0bedf17 authored by Max Lyon's avatar Max Lyon
Browse files

replace more nullptr with NULL

parent 276decf8
......@@ -90,14 +90,14 @@ private:
Type type_;
private:
static const char** descriptions(size_t* _nmbr = nullptr)
static const char** descriptions(size_t* _nmbr = NULL)
{
// There is a long and a short description. The short one is the first letter
// for the long one. For OK it is desirable to have a blank as short description,
// and this is the reason of the extra blank in " OK".
static const char* descr[] =
{ " OK", "WARNING", "ERROR", "FAILURE" , "CRASH", "HANG" };
if (_nmbr != nullptr)
if (_nmbr != NULL)
*_nmbr = std::end(descr) - std::begin(descr);
return descr;
}
......
......@@ -17,7 +17,7 @@ bool variable(const char* _vrbl_name, std::string& _vrbl)
{
#ifdef WIN32 // The Windows implementation uses the secure getenv_s()
size_t char_nmbr;
getenv_s(&char_nmbr, nullptr, 0, _vrbl_name);
getenv_s(&char_nmbr, NULL, 0, _vrbl_name);
if (char_nmbr == 0)
return false;
_vrbl.resize(char_nmbr);
......@@ -36,10 +36,10 @@ bool variable(const char* _vrbl_name, std::string& _vrbl)
LocaleSession::LocaleSession(const char* const _ssn_lcle)
{
lcl_bckp_ = std::locale::global(std::locale(_ssn_lcle));
auto* lcle = ::setlocale(LC_ALL, nullptr);
DEB_error_if(lcle == nullptr,
auto* lcle = ::setlocale(LC_ALL, NULL);
DEB_error_if(lcle == NULL,
"std::locale::global() failed to set " << _ssn_lcle);
DEB_error_if(lcle != nullptr && strcmp(lcle, _ssn_lcle) != 0,
DEB_error_if(lcle != NULL && strcmp(lcle, _ssn_lcle) != 0,
"set_locale() was asked to set " << _ssn_lcle <<
", but actually set " << lcle);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment