mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-05 07:34:03 +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 characterCountBitsForVersions0To9_;
|
||||||
int characterCountBitsForVersions10To26_;
|
int characterCountBitsForVersions10To26_;
|
||||||
int characterCountBitsForVersions27AndHigher_;
|
int characterCountBitsForVersions27AndHigher_;
|
||||||
std::string name_;
|
|
||||||
int bits_;
|
int bits_;
|
||||||
|
std::string name_;
|
||||||
|
|
||||||
Mode(int cbv0_9, int cbv10_26, int cbv27, int bits, char const* 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 HANZI;
|
||||||
|
|
||||||
static Mode& forBits(int bits);
|
static Mode& forBits(int bits);
|
||||||
int getCharacterCountBits(Version *version);
|
int getCharacterCountBits(const Version *version) const;
|
||||||
int getBits() const { return bits_; }
|
int getBits() const { return bits_; }
|
||||||
|
|
||||||
bool operator==(const Mode& other);
|
bool operator==(const Mode& other);
|
||||||
|
@ -54,6 +54,7 @@ Mode::Mode(const zxing::qrcode::Mode &mode)
|
|||||||
characterCountBitsForVersions0To9_ = mode.characterCountBitsForVersions0To9_;
|
characterCountBitsForVersions0To9_ = mode.characterCountBitsForVersions0To9_;
|
||||||
characterCountBitsForVersions10To26_ = mode.characterCountBitsForVersions10To26_;
|
characterCountBitsForVersions10To26_ = mode.characterCountBitsForVersions10To26_;
|
||||||
characterCountBitsForVersions27AndHigher_ = mode.characterCountBitsForVersions27AndHigher_;
|
characterCountBitsForVersions27AndHigher_ = mode.characterCountBitsForVersions27AndHigher_;
|
||||||
|
bits_ = mode.bits_;
|
||||||
name_ = mode.name_;
|
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();
|
int number = version->getVersionNumber();
|
||||||
if (number <= 9) {
|
if (number <= 9) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user