From 99de80e7224f2491fb7518e32f195ad6a912b624 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:19:20 +0100 Subject: replaced all uses of NULL with nullptr fixed a few placed where NULL was used as a number or boolean --- src/shared/fallout3info.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/shared/fallout3info.cpp') diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 82b285b7..6c420044 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -60,7 +60,7 @@ std::wstring Fallout3Info::getRegPathStatic() WCHAR temp[MAX_PATH]; DWORD bufferSize = MAX_PATH; - if (::RegQueryValueExW(key, L"Installed Path", NULL, NULL, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) { + if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) { return std::wstring(temp); } else { return std::wstring(); @@ -74,9 +74,9 @@ std::wstring Fallout3Info::getInvalidationBSA() bool Fallout3Info::isInvalidationBSA(const std::wstring &bsaName) { - static LPCWSTR invalidation[] = { L"Fallout - AI!.bsa", L"Fallout - Invalidation.bsa", NULL }; + static LPCWSTR invalidation[] = { L"Fallout - AI!.bsa", L"Fallout - Invalidation.bsa", nullptr }; - for (int i = 0; invalidation[i] != NULL; ++i) { + for (int i = 0; invalidation[i] != nullptr; ++i) { if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) { return true; } @@ -203,7 +203,7 @@ void Fallout3Info::createProfile(const std::wstring &directory, bool useDefaults std::wostringstream source; source << getLocalAppFolder() << "\\Fallout3\\plugins.txt"; if (!::CopyFileW(source.str().c_str(), target.str().c_str(), true)) { - HANDLE file = ::CreateFileW(target.str().c_str(), GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE file = ::CreateFileW(target.str().c_str(), GENERIC_WRITE, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr); ::CloseHandle(file); } } @@ -256,9 +256,9 @@ void Fallout3Info::repairProfile(const std::wstring &directory) bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { - static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", NULL }; + static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; - for (int i = 0; profileFiles[i] != NULL; ++i) { + for (int i = 0; profileFiles[i] != nullptr; ++i) { if (_wcsicmp(fileName, profileFiles[i]) == 0) { return true; } -- cgit v1.3.1