mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2025-02-24 18:38:25 +00:00
Simplified C++ code by removing qualifying prefix when calling static functions.
This commit is contained in:
parent
777a9365f1
commit
573c5bba9d
@ -114,15 +114,15 @@ vector<QrSegment> QrSegment::makeSegments(const char *text) {
|
|||||||
// Select the most efficient segment encoding automatically
|
// Select the most efficient segment encoding automatically
|
||||||
vector<QrSegment> result;
|
vector<QrSegment> result;
|
||||||
if (*text == '\0'); // Leave the vector empty
|
if (*text == '\0'); // Leave the vector empty
|
||||||
else if (QrSegment::isNumeric(text))
|
else if (isNumeric(text))
|
||||||
result.push_back(QrSegment::makeNumeric(text));
|
result.push_back(makeNumeric(text));
|
||||||
else if (QrSegment::isAlphanumeric(text))
|
else if (isAlphanumeric(text))
|
||||||
result.push_back(QrSegment::makeAlphanumeric(text));
|
result.push_back(makeAlphanumeric(text));
|
||||||
else {
|
else {
|
||||||
vector<uint8_t> bytes;
|
vector<uint8_t> bytes;
|
||||||
for (; *text != '\0'; text++)
|
for (; *text != '\0'; text++)
|
||||||
bytes.push_back(static_cast<uint8_t>(*text));
|
bytes.push_back(static_cast<uint8_t>(*text));
|
||||||
result.push_back(QrSegment::makeBytes(bytes));
|
result.push_back(makeBytes(bytes));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user