Skip to content

Commit

Permalink
Apply code style suggestion.
Browse files Browse the repository at this point in the history
Co-authored-by: Jérôme Duval <[email protected]>
  • Loading branch information
OscarL and korli committed Nov 27, 2024
1 parent fcb94e4 commit e664886
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lpe/lpe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static BString sTempFilePath;

void DoError(const char *e, ...);
void Usage(bool error);
void OpenInPe(entry_ref& ref, int lineNr, int colNr=-1);
void OpenInPe(entry_ref& ref, int lineNr, int colNr = -1);

void Usage(bool error)
{
Expand Down Expand Up @@ -84,11 +84,12 @@ void OpenInPe(entry_ref& doc, int lineNr, int colNr)
BMessage msg(msg_CommandLineOpen), reply;
msg.AddRef("refs", &doc);

if (lineNr >= 0)
if (lineNr >= 0) {
msg.AddInt32("line", lineNr);

if (colNr >= 0)
msg.AddInt32("column", colNr);
if (colNr >= 0)
msg.AddInt32("column", colNr);
}

entry_ref pe;
if (be_roster->FindApp("application/x-vnd.beunited.pe", &pe))
Expand Down Expand Up @@ -193,7 +194,7 @@ int main(int argc, char *argv[])
path = argv[i];

err = e.SetTo(path.String());
if (err == B_OK && !e.Exists() && path.FindLast(':'))
if (err == B_OK && !e.Exists() && path.FindLast(':') >= 0)
{
// remove final ':', if any.
if (path[path.Length() - 1] == ':')
Expand Down

0 comments on commit e664886

Please sign in to comment.