mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Fix build with Clang on Windows
This commit is contained in:
@@ -71,6 +71,16 @@ namespace BlackMisc
|
||||
return ok;
|
||||
}
|
||||
|
||||
CAtomicFile::~CAtomicFile()
|
||||
{
|
||||
#if __cplusplus >= 201700L
|
||||
const bool ex = std::uncaught_exceptions() > 0;
|
||||
#else
|
||||
const bool ex = std::uncaught_exception();
|
||||
#endif
|
||||
if (ex) { QFile::close(); }
|
||||
}
|
||||
|
||||
void CAtomicFile::close()
|
||||
{
|
||||
if (! isOpen()) { return; }
|
||||
|
||||
Reference in New Issue
Block a user