mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Last set of minor cleanups
This commit is contained in:
parent
1cd8351054
commit
b55fb4f2f6
5 changed files with 34 additions and 30 deletions
|
@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "debug.h"
|
||||
#include "log.h"
|
||||
#include "util/string.h"
|
||||
#include "porting.h"
|
||||
|
||||
enum ValueType
|
||||
{
|
||||
|
@ -566,23 +567,6 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
//template<typename T> struct alignment_trick { char c; T member; };
|
||||
//#define ALIGNOF(type) offsetof (alignment_trick<type>, member)
|
||||
#ifdef _WIN32
|
||||
#define ALIGNOF(x) __alignof(x)
|
||||
#else
|
||||
#define ALIGNOF(x) __alignof__(x)
|
||||
#endif
|
||||
#define PADDING(x, y) ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1))
|
||||
#ifdef _WIN32
|
||||
#define strtok_r(x, y, z) strtok_s(x, y, z)
|
||||
#define strtof(x, y) (float)strtod(x, y)
|
||||
#define strtoll(x, y, z) _strtoi64(x, y, z)
|
||||
#define strtoull(x, y, z) _strtoui64(x, y, z)
|
||||
#endif
|
||||
|
||||
typedef long long int s64; //to be added to src/irrlichttypes.h later
|
||||
|
||||
template <class T> T *getStruct(std::string name, std::string format)
|
||||
{
|
||||
size_t len = sizeof(T);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue