aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2004-07-23 01:39:05 +0000
committerMax Horn2004-07-23 01:39:05 +0000
commit3381b831eb59570b9318a7a0179429f39b90df84 (patch)
treecab6311b556d9eb3369398fcb76033344b1ee53b /common
parent24e89ad42428ed7d612f124a67e5329ce6c84505 (diff)
downloadscummvm-rg350-3381b831eb59570b9318a7a0179429f39b90df84.tar.gz
scummvm-rg350-3381b831eb59570b9318a7a0179429f39b90df84.tar.bz2
scummvm-rg350-3381b831eb59570b9318a7a0179429f39b90df84.zip
Allow subclasses to modify File class members (e.g. to set _ioFailed); change some warnings into errors
svn-id: r14302
Diffstat (limited to 'common')
-rw-r--r--common/file.cpp4
-rw-r--r--common/file.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 20876bee37..4dbebebc6e 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -126,7 +126,7 @@ void File::decRef() {
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 @@ bool File::open(const char *filename, AccessMode mode, const char *directory) {
}
if (mode != kFileReadMode && mode != kFileWriteMode) {
- warning("Only read/write mode supported!");
+ error("Only read/write mode supported!");
return false;
}
diff --git a/common/file.h b/common/file.h
index ad2c5d5980..a55f4f086c 100644
--- a/common/file.h
+++ b/common/file.h
@@ -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;