mirror of https://github.com/stella-emu/stella.git
Wrap json.hxx in another header, which disables warnings for code we don't control.
Eventually we can add directives here for other compilers too (in json_lib.hxx).
This commit is contained in:
parent
e3e0fc5a47
commit
43fafb45ef
|
@ -580,10 +580,6 @@ else
|
||||||
darwin*)
|
darwin*)
|
||||||
DEFINES="$DEFINES -DUNIX -DDARWIN"
|
DEFINES="$DEFINES -DUNIX -DDARWIN"
|
||||||
_host_os=darwin
|
_host_os=darwin
|
||||||
if test "$have_clang" = yes; then
|
|
||||||
CXXFLAGS="$CXXFLAGS -Wno-documentation-unknown-command -Wno-documentation-pedantic -Wno-poison-system-directories"
|
|
||||||
CXXFLAGS="$CXXFLAGS -Wno-unknown-warning-option"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
irix*)
|
irix*)
|
||||||
DEFINES="$DEFINES -DUNIX"
|
DEFINES="$DEFINES -DUNIX"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
#include "EventHandlerConstants.hxx"
|
#include "EventHandlerConstants.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class handles controller mappings in Stella.
|
This class handles controller mappings in Stella.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
#include "EventHandlerConstants.hxx"
|
#include "EventHandlerConstants.hxx"
|
||||||
#include "StellaKeys.hxx"
|
#include "StellaKeys.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class handles keyboard mappings in Stella.
|
This class handles keyboard mappings in Stella.
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Event;
|
||||||
#include "EventHandlerConstants.hxx"
|
#include "EventHandlerConstants.hxx"
|
||||||
#include "PhysicalJoystick.hxx"
|
#include "PhysicalJoystick.hxx"
|
||||||
#include "Variant.hxx"
|
#include "Variant.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
|
|
||||||
using PhysicalJoystickPtr = shared_ptr<PhysicalJoystick>;
|
using PhysicalJoystickPtr = shared_ptr<PhysicalJoystick>;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "Console.hxx"
|
#include "Console.hxx"
|
||||||
#include "EventHandler.hxx"
|
#include "EventHandler.hxx"
|
||||||
#include "PKeyboardHandler.hxx"
|
#include "PKeyboardHandler.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
#include "EventHandlerConstants.hxx"
|
#include "EventHandlerConstants.hxx"
|
||||||
#include "JoyMap.hxx"
|
#include "JoyMap.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
An abstraction of a physical (real) joystick in Stella.
|
An abstraction of a physical (real) joystick in Stella.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "EventHandlerConstants.hxx"
|
#include "EventHandlerConstants.hxx"
|
||||||
#include "Event.hxx"
|
#include "Event.hxx"
|
||||||
#include "json.hxx"
|
#include "json_lib.hxx"
|
||||||
#include "StellaKeys.hxx"
|
#include "StellaKeys.hxx"
|
||||||
|
|
||||||
NLOHMANN_JSON_SERIALIZE_ENUM(JoyAxis, {
|
NLOHMANN_JSON_SERIALIZE_ENUM(JoyAxis, {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
//============================================================================
|
||||||
|
//
|
||||||
|
// SSSS tt lll lll
|
||||||
|
// SS SS tt ll ll
|
||||||
|
// SS tttttt eeee ll ll aaaa
|
||||||
|
// SSSS tt ee ee ll ll aa
|
||||||
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||||
|
// SS SS tt ee ll ll aa aa
|
||||||
|
// SSSS ttt eeeee llll llll aaaaa
|
||||||
|
//
|
||||||
|
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
||||||
|
// and the Stella Team
|
||||||
|
//
|
||||||
|
// See the file "License.txt" for information on usage and redistribution of
|
||||||
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
|
//============================================================================
|
||||||
|
|
||||||
|
#ifndef JSON_LIB_HXX
|
||||||
|
#define JSON_LIB_HXX
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can't control the quality of code from outside projects, so for now
|
||||||
|
* just disable warnings for it.
|
||||||
|
*/
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Weverything"
|
||||||
|
#include "json.hxx"
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#else
|
||||||
|
#include "json.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // JSON_LIB_HXX
|
Loading…
Reference in New Issue