From 648f813f8c89e6e7d0ed5bda2c2149bee2babb09 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 22 Jul 2022 18:33:38 +0100 Subject: Switch from NULL to nullptr. --- src/configparser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/configparser.cpp') diff --git a/src/configparser.cpp b/src/configparser.cpp index 76ddc6378..fa349fbe6 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -280,7 +280,7 @@ struct Parser final stack.output.emplace(name, tag); } // this is not a leak; shared_ptr takes care of the delete - tag = NULL; + tag = nullptr; } bool outer_parse() @@ -647,7 +647,7 @@ long ConfigTag::getInt(const std::string& key, long def, long min, long max) con return def; const char* res_cstr = result.c_str(); - char* res_tail = NULL; + char* res_tail = nullptr; long res = strtol(res_cstr, &res_tail, 0); if (res_tail == res_cstr) return def; @@ -664,7 +664,7 @@ unsigned long ConfigTag::getUInt(const std::string& key, unsigned long def, unsi return def; const char* res_cstr = result.c_str(); - char* res_tail = NULL; + char* res_tail = nullptr; unsigned long res = strtoul(res_cstr, &res_tail, 0); if (res_tail == res_cstr) return def; @@ -697,7 +697,7 @@ double ConfigTag::getFloat(const std::string& key, double def, double min, doubl if (!readString(key, result)) return def; - double res = strtod(result.c_str(), NULL); + double res = strtod(result.c_str(), nullptr); CheckRange(this, key, res, def, min, max); return res; } -- cgit v1.3.1-10-gc9f91