From a93c8c5d3ee5345f3a7889d501370f30494e5278 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 24 Mar 2017 00:35:37 +0200 Subject: Unify all string function parameters to be const Common::String & Thanks to wjp for the suggestion --- engines/fullpipe/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe/utils.cpp') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index ed30096b69..5500d23202 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -33,7 +33,7 @@ namespace Fullpipe { -bool CObject::loadFile(Common::String fname) { +bool CObject::loadFile(const Common::String &fname) { Common::File file; if (!file.open(fname)) @@ -112,7 +112,7 @@ Common::String MfcArchive::readPascalString(bool twoByte) { return result; } -void MfcArchive::writePascalString(Common::String str, bool twoByte) { +void MfcArchive::writePascalString(const Common::String &str, bool twoByte) { int len = str.size(); if (twoByte) @@ -154,7 +154,7 @@ bool MemoryObject::load(MfcArchive &file) { return true; } -void MemoryObject::loadFile(Common::String filename) { +void MemoryObject::loadFile(const Common::String &filename) { debugC(5, kDebugLoading, "MemoryObject::loadFile(<%s>)", filename.c_str()); if (filename.empty()) @@ -501,7 +501,7 @@ Common::String genFileName(int superId, int sceneId, const char *ext) { } // Translates cp-1251..utf-8 -byte *transCyrillic(Common::String str) { +byte *transCyrillic(const Common::String &str) { byte *s = (byte *)str.c_str(); static byte tmp[1024]; -- cgit v1.2.3