1
0
forked from 0ad/0ad

MSVC warning fixes

This was SVN commit r7580.
This commit is contained in:
Ykkrosh 2010-05-25 18:44:33 +00:00
parent 47a03c3397
commit 5ce9acc263
2 changed files with 14 additions and 2 deletions

View File

@ -18,9 +18,9 @@
#ifndef INCLUDED_AUTOROOTERS
#define INCLUDED_AUTOROOTERS
#include "js/jsapi.h"
#include "scriptinterface/ScriptTypes.h"
class ScriptInterface;
#include "js/jsapi.h"
// Exception-safety and GC-safety wrapper for JSIdArray
// (TODO: it'd be nicer to use the existing js::AutoIdArray but currently that
@ -54,6 +54,7 @@ public:
*/
class AutoGCRooter
{
NONCOPYABLE(AutoGCRooter);
public:
AutoGCRooter(ScriptInterface& scriptInterface);
~AutoGCRooter();

View File

@ -29,8 +29,19 @@
#include "scriptinterface/ScriptInterface.h"
#include "scriptinterface/AutoRooters.h"
// Shut up some warnings triggered by jsobj.h
#if MSC_VERSION
# pragma warning(push)
# pragma warning(disable:4512) // assignment operator could not be generated
# pragma warning(disable:4800) // forcing value to bool 'true' or 'false' (performance warning)
#endif
#include "js/jsobj.h"
#if MSC_VERSION
# pragma warning(pop)
#endif
CBinarySerializer::CBinarySerializer(ScriptInterface& scriptInterface) :
m_ScriptInterface(scriptInterface), m_ScriptBackrefsNext(1), m_Rooter(scriptInterface)
{