Avoid performance warning in MSVC compilation.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb773674.aspx says PathIsRootW() returns TRUE or FALSE.
This commit is contained in:
Wedge009 2016-10-05 19:06:00 +11:00
parent 67d094d06f
commit 75278bac02

View file

@ -981,7 +981,7 @@ bool is_root(const std::string& path)
// See also: <https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.html>
//
const std::wstring& wpath = bfs::path{path}.make_preferred().wstring();
return PathIsRootW(wpath.c_str());
return PathIsRootW(wpath.c_str()) == TRUE;
#endif
}