1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Correct declarations of utility methods

This commit is contained in:
Capostrophic 2020-02-02 18:40:11 +03:00
parent e363d5df21
commit 0479311c25
2 changed files with 7 additions and 7 deletions

View file

@ -38,7 +38,7 @@ namespace Nif
} }
// Convenience utility functions: get the versions of the currently read file // Convenience utility functions: get the versions of the currently read file
unsigned int NIFStream::getVersion() { return file->getVersion(); } unsigned int NIFStream::getVersion() const { return file->getVersion(); }
unsigned int NIFStream::getUserVersion() { return file->getBethVersion(); } unsigned int NIFStream::getUserVersion() const { return file->getBethVersion(); }
unsigned int NIFStream::getBethVersion() { return file->getBethVersion(); } unsigned int NIFStream::getBethVersion() const { return file->getBethVersion(); }
} }

View file

@ -159,12 +159,12 @@ public:
std::string getString(); std::string getString();
unsigned int getVersion(); unsigned int getVersion() const;
unsigned int getUserVersion(); unsigned int getUserVersion() const;
unsigned int getBethVersion(); unsigned int getBethVersion() const;
// Convert human-readable version numbers into a number that can be compared. // Convert human-readable version numbers into a number that can be compared.
uint32_t generateVersion(uint8_t major, uint8_t minor, uint8_t patch, uint8_t rev) static constexpr uint32_t generateVersion(uint8_t major, uint8_t minor, uint8_t patch, uint8_t rev)
{ {
return (major << 24) + (minor << 16) + (patch << 8) + rev; return (major << 24) + (minor << 16) + (patch << 8) + rev;
} }