Skip to content

Commit

Permalink
Constify the Archive::exists method
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Jul 21, 2015
1 parent c685ed4 commit 574a988
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/archives/archive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Archive {
public:
virtual ~Archive() { }
virtual IStreamPtr open(const char *name) = 0;
virtual bool exists(const char *name) = 0;
virtual bool exists(const char *name) const = 0;
virtual const std::set<std::string> &list() const = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion components/archives/bsaarchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ IStreamPtr BsaArchive::open(size_t id)
return open(mEntries[std::distance(mLookupId.begin(), iter)]);
}

bool BsaArchive::exists(const char *name)
bool BsaArchive::exists(const char *name) const
{
return (mLookupName.find(name) != mLookupName.end());
}
Expand Down
2 changes: 1 addition & 1 deletion components/archives/bsaarchive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BsaArchive : public Archive {
virtual IStreamPtr open(const char *name);
IStreamPtr open(size_t id);

virtual bool exists(const char *name);
virtual bool exists(const char *name) const;

virtual const std::set<std::string> &list() const final { return mLookupName; };
};
Expand Down

0 comments on commit 574a988

Please sign in to comment.