mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Enable editor for 32bit platform
This commit is contained in:
parent
29b2a81442
commit
36b87689f9
2
.github/workflows/github.yml
vendored
2
.github/workflows/github.yml
vendored
@ -103,7 +103,7 @@ jobs:
|
||||
pack: 1
|
||||
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
|
||||
extension: exe
|
||||
cmake_args: -G Ninja -DENABLE_EDITOR=0
|
||||
cmake_args: -G Ninja
|
||||
- platform: msvc
|
||||
os: windows-latest
|
||||
test: 0
|
||||
|
@ -13,13 +13,15 @@
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
|
||||
using NumericPointer = unsigned long long;
|
||||
|
||||
using NumericPointer = typename std::conditional<sizeof(void *) == sizeof(unsigned long long),
|
||||
unsigned long long, unsigned int>::type;
|
||||
|
||||
template<class Type>
|
||||
NumericPointer data_cast(Type * _pointer)
|
||||
{
|
||||
static_assert(sizeof(Type *) == sizeof(NumericPointer),
|
||||
"Compiled for 64 bit arcitecture. Use NumericPointer = unsigned int");
|
||||
"Cannot compile for that architecture, see NumericPointer definition");
|
||||
|
||||
return reinterpret_cast<NumericPointer>(_pointer);
|
||||
}
|
||||
@ -28,7 +30,7 @@ template<class Type>
|
||||
Type * data_cast(NumericPointer _numeric)
|
||||
{
|
||||
static_assert(sizeof(Type *) == sizeof(NumericPointer),
|
||||
"Compiled for 64 bit arcitecture. Use NumericPointer = unsigned int");
|
||||
"Cannot compile for that architecture, see NumericPointer definition");
|
||||
|
||||
return reinterpret_cast<Type *>(_numeric);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user