- re-applied my changes to ADLMIDI code:

* disable sstream. No point pulling in such a large piece of code for two error messages.
* disable MSVC warnings which get emitted by the code.
This commit is contained in:
Christoph Oelckers 2018-03-24 21:30:59 +01:00
parent e31830e8be
commit 77a2101c06
2 changed files with 9 additions and 3 deletions

View file

@ -107,7 +107,7 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank)
MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer); MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
if(static_cast<uint32_t>(bankno) >= NumBanks) if(static_cast<uint32_t>(bankno) >= NumBanks)
{ {
#ifndef __WATCOMC__ #if 0 //ndef __WATCOMC__
std::stringstream s; std::stringstream s;
s << "bank number may only be 0.." << (NumBanks - 1) << ".\n"; s << "bank number may only be 0.." << (NumBanks - 1) << ".\n";
play->setErrorString(s.str()); play->setErrorString(s.str());
@ -142,7 +142,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4)
MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer); MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
if((unsigned int)ops4 > 6 * play->m_setup.NumCards) if((unsigned int)ops4 > 6 * play->m_setup.NumCards)
{ {
#ifndef __WATCOMC__ #if 0 //ndef __WATCOMC__
std::stringstream s; std::stringstream s;
s << "number of four-op channels may only be 0.." << (6 * (play->m_setup.NumCards)) << " when " << play->m_setup.NumCards << " OPL3 cards are used.\n"; s << "number of four-op channels may only be 0.." << (6 * (play->m_setup.NumCards)) << " when " << play->m_setup.NumCards << " OPL3 cards are used.\n";
play->setErrorString(s.str()); play->setErrorString(s.str());

View file

@ -75,7 +75,6 @@ typedef int32_t ssize_t;
#include <vector> #include <vector>
#include <list> #include <list>
#include <string> #include <string>
#include <sstream>
//#ifdef __WATCOMC__ //#ifdef __WATCOMC__
//#include <myset.h> //TODO: Implemnet a workaround for OpenWatcom to fix a crash while using those containers //#include <myset.h> //TODO: Implemnet a workaround for OpenWatcom to fix a crash while using those containers
//#include <mymap.h> //#include <mymap.h>
@ -105,6 +104,13 @@ typedef int32_t ssize_t;
#include <deque> #include <deque>
#include <algorithm> #include <algorithm>
#ifdef _MSC_VER
#pragma warning(disable:4319)
#pragma warning(disable:4267)
#pragma warning(disable:4244)
#pragma warning(disable:4146)
#endif
#include "fraction.hpp" #include "fraction.hpp"
#ifndef ADLMIDI_HW_OPL #ifndef ADLMIDI_HW_OPL