mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 19:20:49 +00:00
Merge branch 'fix-debug-build' into 'master'
Use correct assertion for the file implementation See merge request OpenMW/openmw!2163
This commit is contained in:
commit
29d8330c5f
@ -7,11 +7,14 @@
|
||||
#include <string.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
namespace Platform::File {
|
||||
|
||||
static auto getNativeHandle(Handle handle)
|
||||
{
|
||||
assert(handle != Handle::Invalid);
|
||||
|
||||
return static_cast<int>(handle);
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,14 @@
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
|
||||
namespace Platform::File {
|
||||
|
||||
static auto getNativeHandle(Handle handle)
|
||||
{
|
||||
assert(handle != Handle::Invalid);
|
||||
|
||||
return reinterpret_cast<FILE*>(static_cast<intptr_t>(handle));
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,14 @@
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <boost/locale.hpp>
|
||||
#include <cassert>
|
||||
|
||||
namespace Platform::File {
|
||||
|
||||
static auto getNativeHandle(Handle handle)
|
||||
{
|
||||
assert(handle != Handle::Invalid);
|
||||
|
||||
return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle));
|
||||
}
|
||||
|
||||
@ -58,8 +61,6 @@ namespace Platform::File {
|
||||
{
|
||||
auto nativeHandle = getNativeHandle(handle);
|
||||
|
||||
assert(isValidHandle(mHandle));
|
||||
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
|
||||
if (!GetFileInformationByHandle(nativeHandle, &info))
|
||||
|
Loading…
x
Reference in New Issue
Block a user