1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Add const modifier to encoder type

This commit is contained in:
elsid 2022-04-24 18:51:30 +02:00
parent c7ba4100e1
commit 13c970b37a
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
3 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ namespace ESM
}
bool Reader::getStringImpl(std::string& str, std::size_t size,
std::istream& stream, ToUTF8::StatelessUtf8Encoder* encoder, bool hasNull)
std::istream& stream, const ToUTF8::StatelessUtf8Encoder* encoder, bool hasNull)
{
std::size_t newSize = size;

View file

@ -31,7 +31,7 @@ namespace ESM
virtual inline bool hasMoreRecs() const = 0;
virtual inline void setEncoder(ToUTF8::StatelessUtf8Encoder* encoder) = 0;
virtual inline void setEncoder(const ToUTF8::StatelessUtf8Encoder* encoder) = 0;
// used to check for dependencies e.g. CS::Editor::run()
virtual inline const std::vector<ESM::MasterData>& getGameFiles() const = 0;
@ -53,7 +53,7 @@ namespace ESM
protected:
bool getStringImpl(std::string& str, std::size_t size,
std::istream& stream, ToUTF8::StatelessUtf8Encoder* encoder, bool hasNull = false);
std::istream& stream, const ToUTF8::StatelessUtf8Encoder* encoder, bool hasNull = false);
};
}

View file

@ -78,7 +78,7 @@ namespace ESM4 {
ReaderContext mCtx;
ToUTF8::StatelessUtf8Encoder* mEncoder;
const ToUTF8::StatelessUtf8Encoder* mEncoder;
std::size_t mFileSize;
@ -143,7 +143,7 @@ namespace ESM4 {
inline bool isEsm4() const final { return true; }
inline void setEncoder(ToUTF8::StatelessUtf8Encoder* encoder) final { mEncoder = encoder; };
inline void setEncoder(const ToUTF8::StatelessUtf8Encoder* encoder) final { mEncoder = encoder; };
const std::vector<ESM::MasterData>& getGameFiles() const final { return mHeader.mMaster; }