mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-19 20:23:35 -04:00
Simplified QrCode.toSvgString() loop ranges in all language versions except C.
This commit is contained in:
+2
-2
@@ -169,8 +169,8 @@ std::string QrCode::toSvgString(int border) const {
|
||||
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n";
|
||||
sb << "\t<path d=\"";
|
||||
bool head = true;
|
||||
for (int y = -border; y < size + border; y++) {
|
||||
for (int x = -border; x < size + border; x++) {
|
||||
for (int y = 0; y < size; y++) {
|
||||
for (int x = 0; x < size; x++) {
|
||||
if (getModule(x, y)) {
|
||||
if (head)
|
||||
head = false;
|
||||
|
||||
Reference in New Issue
Block a user