From: <pst...@us...> - 2008-11-15 23:52:37
|
Revision: 631 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=631&view=rev Author: pstieber Date: 2008-11-15 23:52:28 +0000 (Sat, 15 Nov 2008) Log Message: ----------- Converted a couple of C-style buffers to wxStrings. Modified Paths: -------------- trunk/jazz/src/Audio.cpp Modified: trunk/jazz/src/Audio.cpp =================================================================== --- trunk/jazz/src/Audio.cpp 2008-11-15 23:51:07 UTC (rev 630) +++ trunk/jazz/src/Audio.cpp 2008-11-15 23:52:28 UTC (rev 631) @@ -307,9 +307,12 @@ } if (!wxFileExists(fname)) { - char buf[500]; - sprintf(buf, "File not found: \"%s\"", fname); - wxMessageBox(buf, "Error", wxOK); + wxString String; + String + << "File not found: \"" + << fname + << '"'; + ::wxMessageBox(String, "Error", wxOK); continue; } assert(0 <= key && key < MAXSMPL); @@ -320,9 +323,12 @@ samples[key]->SetPitch(pitch); if (samples[key]->Load()) { - char buf[500]; - sprintf(buf, "could not load \"%s\"", samples[key]->GetFilename()); - wxMessageBox(buf, "Error", wxOK); + wxString String; + String + << "Could not load: \"" + << samples[key]->GetFilename() + << '"'; + ::wxMessageBox(String, "Error", wxOK); } if (samplewin[key]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |