- 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);
if(static_cast<uint32_t>(bankno) >= NumBanks)
{
#ifndef __WATCOMC__
#if 0 //ndef __WATCOMC__
std::stringstream s;
s << "bank number may only be 0.." << (NumBanks - 1) << ".\n";
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);
if((unsigned int)ops4 > 6 * play->m_setup.NumCards)
{
#ifndef __WATCOMC__
#if 0 //ndef __WATCOMC__
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";
play->setErrorString(s.str());

View File

@ -75,7 +75,6 @@ typedef int32_t ssize_t;
#include <vector>
#include <list>
#include <string>
#include <sstream>
//#ifdef __WATCOMC__
//#include <myset.h> //TODO: Implemnet a workaround for OpenWatcom to fix a crash while using those containers
//#include <mymap.h>
@ -105,6 +104,13 @@ typedef int32_t ssize_t;
#include <deque>
#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"
#ifndef ADLMIDI_HW_OPL