mirror of https://github.com/status-im/qzxing.git
Added copy constructor to zxing::qrcore::ErrorCorrectionLevel
This commit is contained in:
parent
42122c1c62
commit
acd7136d9b
|
@ -31,6 +31,7 @@ private:
|
||||||
int bits_;
|
int bits_;
|
||||||
std::string name_;
|
std::string name_;
|
||||||
ErrorCorrectionLevel(int inOrdinal, int bits, char const* name);
|
ErrorCorrectionLevel(int inOrdinal, int bits, char const* name);
|
||||||
|
ErrorCorrectionLevel(const ErrorCorrectionLevel& other);
|
||||||
static ErrorCorrectionLevel *FOR_BITS[];
|
static ErrorCorrectionLevel *FOR_BITS[];
|
||||||
static int N_LEVELS;
|
static int N_LEVELS;
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -29,7 +29,12 @@ namespace qrcode {
|
||||||
ErrorCorrectionLevel::ErrorCorrectionLevel(int inOrdinal,
|
ErrorCorrectionLevel::ErrorCorrectionLevel(int inOrdinal,
|
||||||
int bits,
|
int bits,
|
||||||
char const* name) :
|
char const* name) :
|
||||||
ordinal_(inOrdinal), bits_(bits), name_(name) {}
|
ordinal_(inOrdinal), bits_(bits), name_(name)
|
||||||
|
{}
|
||||||
|
|
||||||
|
ErrorCorrectionLevel::ErrorCorrectionLevel(const ErrorCorrectionLevel &other) :
|
||||||
|
ordinal_(other.ordinal()), bits_(other.bits()), name_(other.name())
|
||||||
|
{}
|
||||||
|
|
||||||
int ErrorCorrectionLevel::ordinal() const {
|
int ErrorCorrectionLevel::ordinal() const {
|
||||||
return ordinal_;
|
return ordinal_;
|
||||||
|
|
Loading…
Reference in New Issue