[Scummvm-cvs-logs] SF.net SVN: scummvm: [20793] scummvm/trunk/engines/scumm/saveload.h

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Feb 20 08:04:07 CET 2006


Revision: 20793
Author:   fingolfin
Date:     2006-02-20 08:03:48 -0800 (Mon, 20 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20793&view=rev

Log Message:
-----------
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)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/saveload.h
Modified: scummvm/trunk/engines/scumm/saveload.h
===================================================================
--- scummvm/trunk/engines/scumm/saveload.h	2006-02-20 15:46:10 UTC (rev 20792)
+++ scummvm/trunk/engines/scumm/saveload.h	2006-02-20 16:03:48 UTC (rev 20793)
@@ -24,6 +24,7 @@
 #define SAVELOAD_H
 
 #include "common/scummsys.h"
+#include <stddef.h>
 
 namespace Common {
 	class InSaveFile;
@@ -72,7 +73,7 @@
  * 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







More information about the Scummvm-git-logs mailing list