summaryrefslogtreecommitdiff
path: root/src/mongo/util/winutil.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/util/winutil.h
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/util/winutil.h')
-rw-r--r--src/mongo/util/winutil.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/mongo/util/winutil.h b/src/mongo/util/winutil.h
index 07b1bd1448c..57e93730867 100644
--- a/src/mongo/util/winutil.h
+++ b/src/mongo/util/winutil.h
@@ -37,19 +37,24 @@
namespace mongo {
- 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 std::endl flushes the buffer.
- errMsgStr = errMsgStr.erase( errMsgStr.length() - 2 );
- std::ostringstream output;
- output << errMsgStr << " (" << 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 std::endl flushes the buffer.
+ errMsgStr = errMsgStr.erase(errMsgStr.length() - 2);
+ std::ostringstream output;
+ output << errMsgStr << " (" << err << ")";
- return output.str();
- }
+ return output.str();
+}
}
#endif
-