:octocat: mask pattern testing performance improvement

This commit is contained in:
smiley
2023-10-23 01:45:00 +02:00
parent af7ba49225
commit 3c2d23d8ac
2 changed files with 52 additions and 38 deletions
+3 -7
View File
@@ -181,14 +181,10 @@ class QRMatrix{
return $this->matrix;
}
$matrix = [];
$matrix = $this->matrix;
for($y = 0; $y < $this->moduleCount; $y++){
$matrix[$y] = [];
for($x = 0; $x < $this->moduleCount; $x++){
$matrix[$y][$x] = $this->checkType($x, $y, $this::IS_DARK);
}
foreach($matrix as &$row){
$row = array_map([$this, 'isDark'], $row);
}
return $matrix;