util/FormatString: return AllocatedString
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "fs/Path.hxx"
|
||||
#include "fs/AllocatedPath.hxx"
|
||||
#include "util/FormatString.hxx"
|
||||
#include "util/AllocatedString.hxx"
|
||||
#include "util/UriUtil.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
@@ -121,8 +122,8 @@ gme_container_scan(Path path_fs, const unsigned int tnum)
|
||||
|
||||
const char *subtune_suffix = uri_get_suffix(path_fs.c_str());
|
||||
if (tnum <= num_songs){
|
||||
return FormatNew(SUBTUNE_PREFIX "%03u.%s",
|
||||
tnum, subtune_suffix);
|
||||
return FormatString(SUBTUNE_PREFIX "%03u.%s",
|
||||
tnum, subtune_suffix).Steal();
|
||||
} else
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "fs/Path.hxx"
|
||||
#include "fs/AllocatedPath.hxx"
|
||||
#include "util/FormatString.hxx"
|
||||
#include "util/AllocatedString.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "system/ByteOrder.hxx"
|
||||
@@ -352,7 +353,7 @@ sidplay_container_scan(Path path_fs, const unsigned int tnum)
|
||||
/* Construct container/tune path names, eg.
|
||||
Delta.sid/tune_001.sid */
|
||||
if(tnum<=info.songs) {
|
||||
return FormatNew(SUBTUNE_PREFIX "%03u.sid", tnum);
|
||||
return FormatString(SUBTUNE_PREFIX "%03u.sid", tnum).Steal();
|
||||
} else
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user