mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 13:10:26 -04:00
Avoid using sprintf() in tagreader.cpp to fix an MSVC warning.
This commit is contained in:
parent
b658f95e06
commit
05e0081414
@ -32,13 +32,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TagLib::String formatSeconds(int seconds)
|
||||
{
|
||||
char secondsString[3];
|
||||
sprintf(secondsString, "%02i", seconds);
|
||||
return secondsString;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
for(int i = 1; i < argc; i++) {
|
||||
@ -89,7 +82,7 @@ int main(int argc, char *argv[])
|
||||
cout << "bitrate - " << properties->bitrate() << endl;
|
||||
cout << "sample rate - " << properties->sampleRate() << endl;
|
||||
cout << "channels - " << properties->channels() << endl;
|
||||
cout << "length - " << minutes << ":" << formatSeconds(seconds) << endl;
|
||||
cout << "length - " << minutes << ":" << setfill('0') << setw(2) << seconds << endl;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user