aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/utils.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2017-03-22 04:50:37 +0200
committerFilippos Karapetis2017-03-22 04:50:37 +0200
commit2649e2b1fc9d0ab0d5d648602f3d6b936e94dbdb (patch)
treedba2cde344bca76897dfb2fefa74c96cfc56cbc1 /engines/fullpipe/utils.cpp
parent83fef244fb4b9389278f3412d9ba446d6fc967a3 (diff)
downloadscummvm-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.cpp12
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;
}