Skip to content

Commit f774418

Browse files
committed
fix configutil
1 parent 5b6c923 commit f774418

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/SPC/util/SPCConfigUtil.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use SPC\builder\BuilderBase;
88
use SPC\builder\BuilderProvider;
99
use SPC\builder\Extension;
10-
use SPC\builder\LibraryBase;
1110
use SPC\exception\WrongUsageException;
1211
use SPC\store\Config;
1312
use Symfony\Component\Console\Input\ArgvInput;
@@ -129,17 +128,15 @@ private function hasCpp(array $extensions, array $libraries): bool
129128
{
130129
// judge cpp-extension
131130
$builderExtNames = array_keys($this->builder->getExts(false));
132-
$extNames = array_map(fn (Extension $x) => $x->getName(), $extensions);
133-
$exts = array_unique([...$builderExtNames, ...$extNames]);
131+
$exts = array_unique([...$builderExtNames, ...$extensions]);
134132

135133
foreach ($exts as $ext) {
136134
if (Config::getExt($ext, 'cpp-extension', false) === true) {
137135
return true;
138136
}
139137
}
140138
$builderLibNames = array_keys($this->builder->getLibs());
141-
$libNames = array_map(fn (LibraryBase $x) => $x->getName(), $libraries);
142-
$libs = array_unique([...$builderLibNames, ...$libNames]);
139+
$libs = array_unique([...$builderLibNames, ...$libraries]);
143140
foreach ($libs as $lib) {
144141
if (Config::getLib($lib, 'cpp-library', false) === true) {
145142
return true;

0 commit comments

Comments
 (0)