Skip to content

Commit

Permalink
#9 clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
F4FXL committed Jan 12, 2022
1 parent 6861340 commit 1314cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions APRStoDPRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ bool CAPRSToDPRS::messageToDPRS(std::string& dprs, CHeaderData& header, CAPRSFra

// extract recipient
auto recipient = boost::trim_copy(frameBody.substr(1, 9));
if(recipient.length() == 0U) {
if(recipient.empty()) {
CLog::logDebug("APRS message has no recipient");
return false;
}
auto dashPos = recipient.find_first_of('-');
if(dashPos != std::string::npos)
recipient = recipient.substr(0, dashPos);


//extract message body
auto messageBody = boost::trim_copy(frameBody.substr(11));

header.setId(header.createId());
Expand Down

0 comments on commit 1314cde

Please sign in to comment.