summaryrefslogtreecommitdiff
path: root/wii/filesystem.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
committerTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
commitebcc95da4c26369511caa90d89c5ed06e1e4853a (patch)
tree6ed445f0204a6e6615088d135c4b29c4309077a4 /wii/filesystem.cpp
parentfdf8cfec2b795393d7ee901abaf747575067068b (diff)
downloadLayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.tar.gz
LayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.zip
brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs)
Diffstat (limited to 'wii/filesystem.cpp')
-rw-r--r--wii/filesystem.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/wii/filesystem.cpp b/wii/filesystem.cpp
index 09fe207..014b693 100644
--- a/wii/filesystem.cpp
+++ b/wii/filesystem.cpp
@@ -38,16 +38,16 @@ void WiiFSObject::unlinkFromParent() {
this->parent = 0;
}
-bool WiiFSObject::nameIsEqual(QString check) {
+bool WiiFSObject::nameIsEqual(QString check) const {
return (bool)(QString::compare(this->name, check, Qt::CaseInsensitive) == 0);
}
-bool WiiFSObject::isFile() { return false; }
-bool WiiFSObject::isDirectory() { return false; }
+bool WiiFSObject::isFile() const { return false; }
+bool WiiFSObject::isDirectory() const { return false; }
/******************************************************************************/
-bool WiiFile::isFile() { return true; }
+bool WiiFile::isFile() const { return true; }
/******************************************************************************/
@@ -56,9 +56,9 @@ WiiDirectory::~WiiDirectory() {
delete ptr;
}
-bool WiiDirectory::isDirectory() { return true; }
+bool WiiDirectory::isDirectory() const { return true; }
-WiiFSObject *WiiDirectory::findByName(QString name, bool recursive) {
+WiiFSObject *WiiDirectory::findByName(QString name, bool recursive) const {
foreach (WiiFSObject *obj, children) {
if (obj->nameIsEqual(name))
return obj;
@@ -108,7 +108,7 @@ WiiFSObject *WiiDirectory::resolvePath(QString path) {
if (pathComponents.isEmpty()) {
// we've reached the end \o/
- return nextObj;
+ return (WiiFSObject *)nextObj;
}
// verify that this object is a directory