Преглед изворни кода

minor fix to CE_ASSERT in OsFile

mikymod пре 12 година
родитељ
комит
efd457cddc
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      src/os/win/OsFile.cpp

+ 3 - 4
src/os/win/OsFile.cpp

@@ -54,10 +54,9 @@ OsFile::~OsFile()
 
 void OsFile::close()
 {
-	if (!CloseHandle(m_file_handle))
-	{
-		CE_ASSERT(false, "Unable to close file\n");
-	}
+	bool closed = CloseHandle(m_file_handle))
+	
+	CE_ASSERT(closed, "Unable to close file\n");
 }
 
 bool OsFile::is_open() const