parent
253f2c9e9d
commit
f26b15e5b5
|
@ -342,24 +342,21 @@ void ImportProject::importCompileCommands(std::istream &istr)
|
||||||
const std::string directory = dirpath;
|
const std::string directory = dirpath;
|
||||||
|
|
||||||
std::ostringstream comm;
|
std::ostringstream comm;
|
||||||
if( obj.find( "arguments" ) != obj.end() ) {
|
if (obj.find("arguments") != obj.end()) {
|
||||||
if( obj[ "arguments" ].is< picojson::array >() ) {
|
if (obj[ "arguments" ].is< picojson::array >()) {
|
||||||
for( const picojson::value& arg : obj[ "arguments" ].get< picojson::array >() ) {
|
for (const picojson::value& arg : obj[ "arguments" ].get< picojson::array >()) {
|
||||||
if( arg.is< std::string >() ) {
|
if (arg.is< std::string >()) {
|
||||||
comm << arg.get< std::string >() << " ";
|
comm << arg.get< std::string >() << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} else if (obj.find("command") != obj.end()) {
|
||||||
else if( obj.find( "command" ) != obj.end() ) {
|
if (obj[ "command" ].is< std::string >()) {
|
||||||
if( obj[ "command" ].is< std::string >() ) {
|
|
||||||
comm << obj[ "command" ].get< std::string >();
|
comm << obj[ "command" ].get< std::string >();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue