diff options
author | bunnei <bunneidev@gmail.com> | 2014-12-07 13:40:04 -0500 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-12-07 13:40:04 -0500 |
commit | 2aa2d341d04b10a5ecb49acbcf3579cf2c2ae35c (patch) | |
tree | 4beadeb20c206faf4f85c25d15eee39c964857f6 /src/common/string_util.cpp | |
parent | f06922268a369c2b76ac2652c58516f915b71606 (diff) | |
parent | 8a624239703c046d89ebeaf3ea13c87af75b550f (diff) |
Merge pull request #245 from rohit-n/null-nullptr
Change NULLs to nullptrs.
Diffstat (limited to 'src/common/string_util.cpp')
-rw-r--r-- | src/common/string_util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index dcec9275f0..7fb7ede5e3 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -31,7 +31,7 @@ std::string ToUpper(std::string str) { // faster than sscanf bool AsciiToHex(const char* _szValue, u32& result) { - char *endptr = NULL; + char *endptr = nullptr; const u32 value = strtoul(_szValue, &endptr, 16); if (!endptr || *endptr) @@ -69,7 +69,7 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar // will be present in the middle of a multibyte sequence. // // This is why we lookup an ANSI (cp1252) locale here and use _vsnprintf_l. - static locale_t c_locale = NULL; + static locale_t c_locale = nullptr; if (!c_locale) c_locale = _create_locale(LC_ALL, ".1252"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); @@ -92,7 +92,7 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar std::string StringFromFormat(const char* format, ...) { va_list args; - char *buf = NULL; + char *buf = nullptr; #ifdef _WIN32 int required = 0; @@ -162,7 +162,7 @@ std::string StripQuotes(const std::string& s) bool TryParse(const std::string &str, u32 *const output) { - char *endptr = NULL; + char *endptr = nullptr; // Reset errno to a value other than ERANGE errno = 0; |