[Scummvm-cvs-logs] scummvm master -> 2c61e80d7e6c6dc14efc96608ebd7f3b4c0b2e02

wjp wjp at usecode.org
Sun Sep 28 23:59:38 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2c61e80d7e CGE2: Constify strings


Commit: 2c61e80d7e6c6dc14efc96608ebd7f3b4c0b2e02
    https://github.com/scummvm/scummvm/commit/2c61e80d7e6c6dc14efc96608ebd7f3b4c0b2e02
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-09-28T23:57:26+02:00

Commit Message:
CGE2: Constify strings

Changed paths:
    engines/cge2/map.cpp
    engines/cge2/sound.cpp



diff --git a/engines/cge2/map.cpp b/engines/cge2/map.cpp
index 1ed0ea7..8c1f000 100644
--- a/engines/cge2/map.cpp
+++ b/engines/cge2/map.cpp
@@ -42,7 +42,7 @@ void Map::clear() {
 void Map::load(int scene) {
 	clear();
 
-	char fname[] = "%.2d.MAP\0";
+	const char *fname = "%.2d.MAP";
 	Common::String fileName = Common::String::format(fname, scene);
 	if (!_vm->_resman->exist(fileName.c_str()))
 		return;
diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp
index 32f94b1..57ec598 100644
--- a/engines/cge2/sound.cpp
+++ b/engines/cge2/sound.cpp
@@ -143,9 +143,9 @@ void Fx::clear() {
 }
 
 Common::String Fx::name(int ref, int sub) {
-	char fxname[] = "%.2dfx%.2d.WAV\0";
-	char subName[] = "%.2dfx%.2d?.WAV\0";
-	char *p = (sub) ? subName : fxname;
+	const char *fxname = "%.2dfx%.2d.WAV";
+	const char *subName = "%.2dfx%.2d?.WAV";
+	const char *p = (sub) ? subName : fxname;
 	Common::String filename = Common::String::format(p, ref >> 8, ref & 0xFF);
 	if (sub)
 		filename.setChar('@' + sub, 6);






More information about the Scummvm-git-logs mailing list