ANDROID: Fix compilation by adapting to latest Archive changes (thanks LordHoto).

This commit is contained in:
Alyssa Milburn 2011-12-13 18:37:33 +01:00
parent d085f4f4e2
commit 6c790ea6a7
2 changed files with 6 additions and 6 deletions

View File

@ -389,7 +389,7 @@ AndroidAssetArchive::~AndroidAssetArchive() {
env->DeleteGlobalRef(_am);
}
bool AndroidAssetArchive::hasFile(const Common::String &name) {
bool AndroidAssetArchive::hasFile(const Common::String &name) const {
JNIEnv *env = JNI::getEnv();
jstring path = env->NewStringUTF(name.c_str());
jobject result = env->CallObjectMethod(_am, MID_open, path, ACCESS_UNKNOWN);
@ -409,7 +409,7 @@ bool AndroidAssetArchive::hasFile(const Common::String &name) {
return true;
}
int AndroidAssetArchive::listMembers(Common::ArchiveMemberList &member_list) {
int AndroidAssetArchive::listMembers(Common::ArchiveMemberList &member_list) const {
JNIEnv *env = JNI::getEnv();
Common::List<Common::String> dirlist;
dirlist.push_back("");
@ -466,7 +466,7 @@ int AndroidAssetArchive::listMembers(Common::ArchiveMemberList &member_list) {
return count;
}
Common::ArchiveMemberPtr AndroidAssetArchive::getMember(const Common::String &name) {
const Common::ArchiveMemberPtr AndroidAssetArchive::getMember(const Common::String &name) const {
return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
}

View File

@ -37,9 +37,9 @@ public:
AndroidAssetArchive(jobject am);
virtual ~AndroidAssetArchive();
virtual bool hasFile(const Common::String &name);
virtual int listMembers(Common::ArchiveMemberList &list);
virtual Common::ArchiveMemberPtr getMember(const Common::String &name);
virtual bool hasFile(const Common::String &name) const;
virtual int listMembers(Common::ArchiveMemberList &list) const;
virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
private: