diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-06-10 18:41:42 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-06-10 22:37:55 -0400 |
commit | 1360f243ee7fa662c0ded25a9bc479aa47388446 (patch) | |
tree | 4e612c60d4e45386800e147e5d67366c61284d71 /src/mongo/util/processinfo_windows.cpp | |
parent | d7d1fdb75966c684e9a42150e6e9b69c4a10ee08 (diff) | |
download | mongo-1360f243ee7fa662c0ded25a9bc479aa47388446.tar.gz |
SERVER-17308 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
Diffstat (limited to 'src/mongo/util/processinfo_windows.cpp')
-rw-r--r-- | src/mongo/util/processinfo_windows.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/util/processinfo_windows.cpp b/src/mongo/util/processinfo_windows.cpp index e370076fec9..f52ff511ef9 100644 --- a/src/mongo/util/processinfo_windows.cpp +++ b/src/mongo/util/processinfo_windows.cpp @@ -31,7 +31,6 @@ #include "mongo/platform/basic.h" -#include <boost/scoped_array.hpp> #include <iostream> #include <psapi.h> @@ -39,7 +38,7 @@ #include "mongo/util/log.h" using namespace std; -using boost::scoped_array; +using std::unique_ptr; namespace mongo { @@ -177,7 +176,7 @@ namespace mongo { return false; } - boost::scoped_array<char> verData(new char[verSize]); + std::unique_ptr<char[]> verData(new char[verSize]); if (GetFileVersionInfoA(filePath, NULL, verSize, verData.get()) == 0) { DWORD gle = GetLastError(); warning() << "GetFileVersionInfoSizeA on " << filePath << " failed with " << errnoWithDescription(gle); @@ -213,7 +212,7 @@ namespace mongo { return false; } - boost::scoped_array<char> systemDirectory(new char[pathBufferSize]); + std::unique_ptr<char[]> systemDirectory(new char[pathBufferSize]); UINT systemDirectoryPathLen; systemDirectoryPathLen = GetSystemDirectoryA(systemDirectory.get(), pathBufferSize); if (systemDirectoryPathLen == 0) { @@ -380,7 +379,7 @@ namespace mongo { DWORD returnLength = 0; DWORD numaNodeCount = 0; - scoped_array<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> buffer; + unique_ptr<SYSTEM_LOGICAL_PROCESSOR_INFORMATION[]> buffer; LPFN_GLPI glpi(reinterpret_cast<LPFN_GLPI>(GetProcAddress( GetModuleHandleW(L"kernel32"), @@ -454,7 +453,7 @@ namespace mongo { bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) { out->resize(numPages); - scoped_array<PSAPI_WORKING_SET_EX_INFORMATION> wsinfo( + unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> wsinfo( new PSAPI_WORKING_SET_EX_INFORMATION[numPages]); const void* startOfFirstPage = alignToStartOfPage(start); |