minor clean-ups
This commit is contained in:
parent
d9ef1cae17
commit
ade04862f8
|
@ -79,14 +79,12 @@ bool CFile::Open(const char * lpszFileName, uint32_t nOpenFlags)
|
||||||
sa.bInheritHandle = (nOpenFlags & modeNoInherit) == 0;
|
sa.bInheritHandle = (nOpenFlags & modeNoInherit) == 0;
|
||||||
|
|
||||||
// map creation flags
|
// map creation flags
|
||||||
ULONG dwCreateFlag = 0;
|
ULONG dwCreateFlag = OPEN_EXISTING;
|
||||||
if (nOpenFlags & modeCreate)
|
if (nOpenFlags & modeCreate)
|
||||||
{
|
{
|
||||||
dwCreateFlag = (nOpenFlags & modeNoTruncate) != 0 ? OPEN_ALWAYS : CREATE_ALWAYS;
|
dwCreateFlag =
|
||||||
}
|
((nOpenFlags & modeNoTruncate) != 0)
|
||||||
else
|
? OPEN_ALWAYS : CREATE_ALWAYS;
|
||||||
{
|
|
||||||
dwCreateFlag = OPEN_EXISTING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt file creation
|
// attempt file creation
|
||||||
|
|
Loading…
Reference in New Issue