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:
Max Horn 2006-02-20 16:03:48 +00:00
parent d87e5d6094
commit 6176252117

View File

@ -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