diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
commit | 1c52d5fff738aa01bd27fd117076ac33515acef5 (patch) | |
tree | ff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/common/Utilities/Util.cpp | |
parent | 02fd3a1f15840203d8515dae12920d9b66655076 (diff) |
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r-- | src/common/Utilities/Util.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index 7625ae9d2ff..5a1ed443649 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -222,7 +222,7 @@ bool IsIPAddress(char const* ipaddress) uint32 CreatePIDFile(std::string const& filename) { FILE* pid_file = fopen(filename.c_str(), "w"); - if (pid_file == NULL) + if (pid_file == nullptr) return 0; uint32 pid = GetPID(); @@ -592,12 +592,12 @@ std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension) static wchar_t const j_End[] = { wchar_t(1), wchar_t(0x0439), wchar_t(0x0000)}; static wchar_t const* const dropEnds[6][8] = { - { &a_End[1], &o_End[1], &ya_End[1], &ie_End[1], &soft_End[1], &j_End[1], NULL, NULL }, - { &a_End[1], &ya_End[1], &yeru_End[1], &i_End[1], NULL, NULL, NULL, NULL }, - { &ie_End[1], &u_End[1], &yu_End[1], &i_End[1], NULL, NULL, NULL, NULL }, - { &u_End[1], &yu_End[1], &o_End[1], &ie_End[1], &soft_End[1], &ya_End[1], &a_End[1], NULL }, - { &oj_End[1], &io_j_End[1], &ie_j_End[1], &o_m_End[1], &io_m_End[1], &ie_m_End[1], &yu_End[1], NULL }, - { &ie_End[1], &i_End[1], NULL, NULL, NULL, NULL, NULL, NULL } + { &a_End[1], &o_End[1], &ya_End[1], &ie_End[1], &soft_End[1], &j_End[1], nullptr, nullptr }, + { &a_End[1], &ya_End[1], &yeru_End[1], &i_End[1], nullptr, nullptr, nullptr, nullptr }, + { &ie_End[1], &u_End[1], &yu_End[1], &i_End[1], nullptr, nullptr, nullptr, nullptr }, + { &u_End[1], &yu_End[1], &o_End[1], &ie_End[1], &soft_End[1], &ya_End[1], &a_End[1], nullptr }, + { &oj_End[1], &io_j_End[1], &ie_j_End[1], &o_m_End[1], &io_m_End[1], &ie_m_End[1], &yu_End[1], nullptr }, + { &ie_End[1], &i_End[1], nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } }; for (wchar_t const* const* itr = &dropEnds[declension][0]; *itr; ++itr) @@ -744,7 +744,7 @@ void HexStrToByteArray(std::string const& str, uint8* out, bool reverse /*= fals for (int32 i = init; i != end; i += 2 * op) { char buffer[3] = { str[i], str[i + 1], '\0' }; - out[j++] = uint8(strtoul(buffer, NULL, 16)); + out[j++] = uint8(strtoul(buffer, nullptr, 16)); } } |