mirror of
https://github.com/status-im/qzxing.git
synced 2025-01-27 03:04:47 +00:00
updated appropriate functions to be marked as const
This commit is contained in:
parent
46f91f7a38
commit
dbc47abff2
@ -34,8 +34,8 @@ private:
|
||||
int characterCountBitsForVersions0To9_;
|
||||
int characterCountBitsForVersions10To26_;
|
||||
int characterCountBitsForVersions27AndHigher_;
|
||||
std::string name_;
|
||||
int bits_;
|
||||
std::string name_;
|
||||
|
||||
Mode(int cbv0_9, int cbv10_26, int cbv27, int bits, char const* name);
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
static Mode HANZI;
|
||||
|
||||
static Mode& forBits(int bits);
|
||||
int getCharacterCountBits(Version *version);
|
||||
int getCharacterCountBits(const Version *version) const;
|
||||
int getBits() const { return bits_; }
|
||||
|
||||
bool operator==(const Mode& other);
|
||||
|
@ -54,6 +54,7 @@ Mode::Mode(const zxing::qrcode::Mode &mode)
|
||||
characterCountBitsForVersions0To9_ = mode.characterCountBitsForVersions0To9_;
|
||||
characterCountBitsForVersions10To26_ = mode.characterCountBitsForVersions10To26_;
|
||||
characterCountBitsForVersions27AndHigher_ = mode.characterCountBitsForVersions27AndHigher_;
|
||||
bits_ = mode.bits_;
|
||||
name_ = mode.name_;
|
||||
}
|
||||
|
||||
@ -87,7 +88,7 @@ Mode& Mode::forBits(int bits) {
|
||||
}
|
||||
}
|
||||
|
||||
int Mode::getCharacterCountBits(Version *version)
|
||||
int Mode::getCharacterCountBits(const Version *version) const
|
||||
{
|
||||
int number = version->getVersionNumber();
|
||||
if (number <= 9) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user