aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVicent Marti2008-06-25 22:30:28 +0000
committerVicent Marti2008-06-25 22:30:28 +0000
commit73d5715a799f393e8b2611f2deff1b7f90f6130a (patch)
tree4e35f7a6d984a5f3879c9dab9350a25f399c3fe5 /common
parent7fd6b3916fce8a61b2235ad720bd7fa7b40a7914 (diff)
downloadscummvm-rg350-73d5715a799f393e8b2611f2deff1b7f90f6130a.tar.gz
scummvm-rg350-73d5715a799f393e8b2611f2deff1b7f90f6130a.tar.bz2
scummvm-rg350-73d5715a799f393e8b2611f2deff1b7f90f6130a.zip
- XMLParser: Improved file stream support
- InterfaceManager: Config file loading/parsing added. - ThemeParser: Fixed GCC warnings/various bugs. svn-id: r32792
Diffstat (limited to 'common')
-rw-r--r--common/xmlparser.cpp3
-rw-r--r--common/xmlparser.h6
2 files changed, 8 insertions, 1 deletions
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index b2178afbd0..6cb3a8a441 100644
--- a/common/xmlparser.cpp
+++ b/common/xmlparser.cpp
@@ -148,6 +148,9 @@ bool XMLParser::parseKeyValue(Common::String keyName) {
bool XMLParser::parse() {
+ if (_text.ready() == false)
+ return parserError("XML stream not ready for reading.");
+
bool activeClosure = false;
bool selfClosure = false;
diff --git a/common/xmlparser.h b/common/xmlparser.h
index bfbc03b97b..3eb87efd31 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -70,6 +70,10 @@ public:
delete _stream;
_stream = s;
}
+
+ bool ready() {
+ return _stream != 0;
+ }
};
/**
@@ -116,7 +120,7 @@ public:
int depth;
};
- virtual bool loadFile(const char *filename) {
+ virtual bool loadFile(Common::String filename) {
Common::File *f = new Common::File;
if (!f->open(filename, Common::File::kFileReadMode))