diff options
Diffstat (limited to 'src/mongo/util/winutil.h')
-rw-r--r-- | src/mongo/util/winutil.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/winutil.h b/src/mongo/util/winutil.h index b4f38ecc9ab..d24adfa3650 100644 --- a/src/mongo/util/winutil.h +++ b/src/mongo/util/winutil.h @@ -38,12 +38,12 @@ namespace mongo { - inline string GetWinErrMsg(DWORD err) { + inline std::string GetWinErrMsg(DWORD err) { LPTSTR errMsg; ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, (LPTSTR)&errMsg, 0, NULL ); std::string errMsgStr = toUtf8String( errMsg ); ::LocalFree( errMsg ); - // FormatMessage() appends a newline to the end of error messages, we trim it because endl flushes the buffer. + // FormatMessage() appends a newline to the end of error messages, we trim it because std::endl flushes the buffer. errMsgStr = errMsgStr.erase( errMsgStr.length() - 2 ); std::ostringstream output; output << errMsgStr << " (" << err << ")"; |