Skip to content

Commit

Permalink
tom formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Sep 9, 2024
1 parent e6d6a63 commit ea5525f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tom/src/tom/commands/completecommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,12 +734,12 @@ QStringList CompleteCommand::getConnectionNamesFromFile()
static const QRegularExpression regex(uR"T("(\w+)".*// shell:connection$)T"_s);

// No need to care about \r\n at the end
while (getline(mainFileStream, line)) {
const auto match = regex.match(QString::fromStdString(line));
while (getline(mainFileStream, line))

if (match.hasMatch())
if (const auto match = regex.match(QString::fromStdString(line));
match.hasMatch()
)
connectionNames << match.captured(1);
}

mainFileStream.close();

Expand Down

0 comments on commit ea5525f

Please sign in to comment.