ADLMIDI: Remove std:: from all snprintf-s

This commit is contained in:
Wohlstand 2018-03-28 20:33:02 +03:00
parent fdd93d704d
commit 99e24efc2c
2 changed files with 7 additions and 7 deletions

View file

@ -108,7 +108,7 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank)
if(static_cast<uint32_t>(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;
}

View file

@ -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,