Tweaked usages of C++ QrSegment::Mode class to be passed by value instead of const reference.
This commit is contained in:
parent
a138e6fbc3
commit
236a999637
|
@ -151,7 +151,7 @@ QrSegment QrSegment::makeEci(long assignVal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QrSegment::QrSegment(const Mode &md, int numCh, const std::vector<bool> &dt) :
|
QrSegment::QrSegment(Mode md, int numCh, const std::vector<bool> &dt) :
|
||||||
mode(md),
|
mode(md),
|
||||||
numChars(numCh),
|
numChars(numCh),
|
||||||
data(dt) {
|
data(dt) {
|
||||||
|
@ -160,7 +160,7 @@ QrSegment::QrSegment(const Mode &md, int numCh, const std::vector<bool> &dt) :
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QrSegment::QrSegment(const Mode &md, int numCh, std::vector<bool> &&dt) :
|
QrSegment::QrSegment(Mode md, int numCh, std::vector<bool> &&dt) :
|
||||||
mode(md),
|
mode(md),
|
||||||
numChars(numCh),
|
numChars(numCh),
|
||||||
data(std::move(dt)) {
|
data(std::move(dt)) {
|
||||||
|
|
|
@ -152,13 +152,13 @@ class QrSegment final {
|
||||||
/*
|
/*
|
||||||
* Creates a new QR Code data segment with the given parameters and data.
|
* Creates a new QR Code data segment with the given parameters and data.
|
||||||
*/
|
*/
|
||||||
public: QrSegment(const Mode &md, int numCh, const std::vector<bool> &dt);
|
public: QrSegment(Mode md, int numCh, const std::vector<bool> &dt);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates a new QR Code data segment with the given parameters and data.
|
* Creates a new QR Code data segment with the given parameters and data.
|
||||||
*/
|
*/
|
||||||
public: QrSegment(const Mode &md, int numCh, std::vector<bool> &&dt);
|
public: QrSegment(Mode md, int numCh, std::vector<bool> &&dt);
|
||||||
|
|
||||||
|
|
||||||
/*---- Methods ----*/
|
/*---- Methods ----*/
|
||||||
|
|
Loading…
Reference in New Issue