Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Remove no longer used function 'isChecksumToken' (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger authored Jan 20, 2021
1 parent 71eb977 commit 9447cce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
12 changes: 0 additions & 12 deletions extras/test/src/test_checksum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,3 @@ TEST_CASE("NMEA message with invalid checksum", "[checksum-03]")
std::string const GPRMC_CHECKSUM_ERROR = "$GPRMC,062101.714,A,5001.869,N,01912.114,E,955535.7,116.2,290520,000.0,W*FF\r\n";
REQUIRE(nmea::util::isChecksumOk(GPRMC_CHECKSUM_ERROR.c_str()) == false);
}

TEST_CASE("Test isChecksumToken(...) with valid checksum token", "[checksum-04]")
{
std::string const VALID_CHECKSUM_TOKEN = "W*FF";
REQUIRE(nmea::util::isChecksumToken(VALID_CHECKSUM_TOKEN.c_str()) == true);
}

TEST_CASE("Test isChecksumToken(...) with invalid checksum token", "[checksum-04]")
{
std::string const INVALID_CHECKSUM_TOKEN = "01912.114";
REQUIRE(nmea::util::isChecksumToken(INVALID_CHECKSUM_TOKEN.c_str()) == false);
}
5 changes: 0 additions & 5 deletions src/nmea/util/checksum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ bool isChecksumOk(char const * const nmea_str)
return (calcChecksum(nmea_str) == extractChecksum(nmea_str));
}

bool isChecksumToken(char const * token)
{
return (strchr(token, '*') != nullptr);
}

/**************************************************************************************
* INTERNAL FUNCTION DEFINITION
**************************************************************************************/
Expand Down
3 changes: 1 addition & 2 deletions src/nmea/util/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ namespace util
* FUNCTION DECLARATION
**************************************************************************************/

bool isChecksumOk (char const * const nmea_str);
bool isChecksumToken(char const * token);
bool isChecksumOk(char const * const nmea_str);

/**************************************************************************************
* NAMESPACE
Expand Down

0 comments on commit 9447cce

Please sign in to comment.