Tweaked Java and C++ code and comment slightly.
This commit is contained in:
parent
6b2cfd98dc
commit
6dfb842afa
|
@ -115,7 +115,7 @@ QrSegment QrSegment::makeAlphanumeric(const char *text) {
|
|||
vector<QrSegment> QrSegment::makeSegments(const char *text) {
|
||||
// Select the most efficient segment encoding automatically
|
||||
vector<QrSegment> result;
|
||||
if (*text == '\0'); // Leave the vector empty
|
||||
if (*text == '\0'); // Leave result empty
|
||||
else if (isNumeric(text))
|
||||
result.push_back(makeNumeric(text));
|
||||
else if (isAlphanumeric(text))
|
||||
|
|
|
@ -118,8 +118,7 @@ public final class QrSegment {
|
|||
|
||||
// Select the most efficient segment encoding automatically
|
||||
List<QrSegment> result = new ArrayList<>();
|
||||
if (text.equals(""))
|
||||
return result;
|
||||
if (text.equals("")); // Leave result empty
|
||||
else if (NUMERIC_REGEX.matcher(text).matches())
|
||||
result.add(makeNumeric(text));
|
||||
else if (ALPHANUMERIC_REGEX.matcher(text).matches())
|
||||
|
|
Loading…
Reference in New Issue