mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
Use ptrdiff_t from stddef.h for our offsetof-clone (this should reduce warnings on e.g. the PS2, but may cause problems on systems that are missing this type/header. Please contact me if this causes problems on your port)
svn-id: r20793
This commit is contained in:
parent
d87e5d6094
commit
6176252117
@ -24,6 +24,7 @@
|
||||
#define SAVELOAD_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include <stddef.h>
|
||||
|
||||
namespace Common {
|
||||
class InSaveFile;
|
||||
@ -72,7 +73,7 @@ namespace Scumm {
|
||||
* current reality (many of our complex structs are non-POD; for an explanation of
|
||||
* what POD means refer to http://www-cpd.fnal.gov/personal/wb/boost/ISOcxx/doc/POD.html)
|
||||
*/
|
||||
#define OFFS(type,item) (((long)(&((type*)42)->type::item))-42)
|
||||
#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
|
||||
|
||||
/**
|
||||
* Similar to the OFFS macro, this macro computes the size (in bytes) of a
|
||||
|
Loading…
x
Reference in New Issue
Block a user