From 99e24efc2c29aa41816ebda928132e4883f3eac2 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 28 Mar 2018 20:33:02 +0300 Subject: [PATCH] ADLMIDI: Remove std:: from all snprintf-s --- src/sound/adlmidi/adlmidi.cpp | 4 ++-- src/sound/adlmidi/adlmidi_midiplay.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sound/adlmidi/adlmidi.cpp b/src/sound/adlmidi/adlmidi.cpp index 586cb901e..db97447a2 100644 --- a/src/sound/adlmidi/adlmidi.cpp +++ b/src/sound/adlmidi/adlmidi.cpp @@ -108,7 +108,7 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank) if(static_cast(bankno) >= NumBanks) { char errBuf[150]; - std::snprintf(errBuf, 150, "Embedded bank number may only be 0..%u!\n", (NumBanks - 1)); + snprintf(errBuf, 150, "Embedded bank number may only be 0..%u!\n", (NumBanks - 1)); play->setErrorString(errBuf); return -1; } @@ -139,7 +139,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) if((unsigned int)ops4 > 6 * play->m_setup.NumCards) { char errBuff[250]; - std::snprintf(errBuff, 250, "number of four-op channels may only be 0..%u when %u OPL3 cards are used.\n", (6 * (play->m_setup.NumCards)), play->m_setup.NumCards); + snprintf(errBuff, 250, "number of four-op channels may only be 0..%u when %u OPL3 cards are used.\n", (6 * (play->m_setup.NumCards)), play->m_setup.NumCards); play->setErrorString(errBuff); return -1; } diff --git a/src/sound/adlmidi/adlmidi_midiplay.cpp b/src/sound/adlmidi/adlmidi_midiplay.cpp index 91270abf9..13e1008c0 100644 --- a/src/sound/adlmidi/adlmidi_midiplay.cpp +++ b/src/sound/adlmidi/adlmidi_midiplay.cpp @@ -319,7 +319,7 @@ bool MIDIplay::buildTrackData() evtPos.delay = ReadVarLenEx(&trackPtr, end, ok); if(!ok) { - int len = std::snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -347,7 +347,7 @@ bool MIDIplay::buildTrackData() event = parseEvent(&trackPtr, end, status); if(!event.isValid) { - int len = std::snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -2643,12 +2643,12 @@ ADLMIDI_EXPORT void AdlInstrumentTester::NextAdl(int offset) if(ains.tone) { /*if(ains.tone < 20) - std::snprintf(ToneIndication, 8, "+%-2d", ains.tone); + snprintf(ToneIndication, 8, "+%-2d", ains.tone); else*/ if(ains.tone < 128) - std::snprintf(ToneIndication, 8, "=%-2d", ains.tone); + snprintf(ToneIndication, 8, "=%-2d", ains.tone); else - std::snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); + snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); } std::printf("%s%s%s%u\t", ToneIndication,