[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.64,1.65 file.h,1.26,1.27

Max Horn fingolfin at users.sourceforge.net
Thu Jul 22 18:40:06 CEST 2004


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11141

Modified Files:
	file.cpp file.h 
Log Message:
Allow subclasses to modify File class members (e.g. to set _ioFailed); change some warnings into errors

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- file.cpp	18 Jul 2004 17:08:10 -0000	1.64
+++ file.cpp	23 Jul 2004 01:39:04 -0000	1.65
@@ -126,7 +126,7 @@
 
 bool File::open(const char *filename, AccessMode mode, const char *directory) {
 	if (_handle) {
-		debug(2, "File %s already opened", filename);
+		error("File %s already opened", filename);
 		return false;
 	}
 
@@ -135,7 +135,7 @@
 	}
 
 	if (mode != kFileReadMode && mode != kFileWriteMode) {
-		warning("Only read/write mode supported!");
+		error("Only read/write mode supported!");
 		return false;
 	}
 

Index: file.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- file.h	28 Jun 2004 22:34:22 -0000	1.26
+++ file.h	23 Jul 2004 01:39:05 -0000	1.27
@@ -28,7 +28,7 @@
 #include "common/stream.h"
 
 class File : public Common::ReadStream, public Common::WriteStream {
-private:
+protected:
 	/** POSIX file handle to the actual file; 0 if no file is open. */
 	FILE *_handle;
 	





More information about the Scummvm-git-logs mailing list