mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Simplified C++ code with vector range constructor.
This commit is contained in:
@@ -75,9 +75,7 @@ int main() {
|
||||
// Make list of segments
|
||||
std::vector<QrSegment> segs;
|
||||
if (isAscii) {
|
||||
std::vector<char> text;
|
||||
for (std::vector<uint8_t>::iterator it = data.begin(); it != data.end(); ++it)
|
||||
text.push_back((char)*it);
|
||||
std::vector<char> text(data.cbegin(), data.cend());
|
||||
text.push_back('\0');
|
||||
segs = QrSegment::makeSegments(text.data());
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user