diff options
author | Filippos Karapetis | 2017-03-22 04:50:37 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-03-22 04:50:37 +0200 |
commit | 2649e2b1fc9d0ab0d5d648602f3d6b936e94dbdb (patch) | |
tree | dba2cde344bca76897dfb2fefa74c96cfc56cbc1 /engines/fullpipe/utils.cpp | |
parent | 83fef244fb4b9389278f3412d9ba446d6fc967a3 (diff) | |
download | scummvm-rg350-2649e2b1fc9d0ab0d5d648602f3d6b936e94dbdb.tar.gz scummvm-rg350-2649e2b1fc9d0ab0d5d648602f3d6b936e94dbdb.tar.bz2 scummvm-rg350-2649e2b1fc9d0ab0d5d648602f3d6b936e94dbdb.zip |
FULLPIPE: Change genFileName() and loadFile() to use Common::String
Diffstat (limited to 'engines/fullpipe/utils.cpp')
-rw-r--r-- | engines/fullpipe/utils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 689491d11d..ed30096b69 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -33,7 +33,7 @@ namespace Fullpipe { -bool CObject::loadFile(const char *fname) { +bool CObject::loadFile(Common::String fname) { Common::File file; if (!file.open(fname)) @@ -486,16 +486,16 @@ void MfcArchive::writeObject(CObject *obj) { } } -char *genFileName(int superId, int sceneId, const char *ext) { - char *s = (char *)calloc(256, 1); +Common::String genFileName(int superId, int sceneId, const char *ext) { + Common::String s; if (superId) { - snprintf(s, 255, "%04d%04d.%s", superId, sceneId, ext); + s = Common::String::format("%04d%04d.%s", superId, sceneId, ext); } else { - snprintf(s, 255, "%04d.%s", sceneId, ext); + s = Common::String::format("%04d.%s", sceneId, ext); } - debugC(7, kDebugLoading, "genFileName: %s", s); + debugC(7, kDebugLoading, "genFileName: %s", s.c_str()); return s; } |