diff options
| author | Heiko Thiel <heiko.thiel@hpi.de> | 2019-05-03 16:31:20 +0200 |
|---|---|---|
| committer | Heiko Thiel <heiko.thiel@hpi.de> | 2019-05-03 16:31:20 +0200 |
| commit | 5dc9ecc44740c34247076e1c26aa5b00f06595ea (patch) | |
| tree | e658fd1bdb94d26deda65cbbdf39fe82c10c4dee /src/NMEAParser.cpp | |
| parent | d8e490622a2693b4b49598d194aab1139d4e821b (diff) | |
Changes are done by run-clang-tidy -header-filter='.*' -checks='-*,readability-container-size-empty' -fix
Diffstat (limited to 'src/NMEAParser.cpp')
| -rw-r--r-- | src/NMEAParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/NMEAParser.cpp b/src/NMEAParser.cpp index e7b0901..edccb6f 100644 --- a/src/NMEAParser.cpp +++ b/src/NMEAParser.cpp @@ -216,7 +216,7 @@ void NMEAParser::readSentence(std::string cmd){ onInfo(nmea, "Processing NEW string..."); - if (cmd.size() == 0){ + if (cmd.empty()){ onWarning(nmea, "Blank string -- Skipped processing."); return; } @@ -323,7 +323,7 @@ uint8_t NMEAParser::calculateChecksum(string s){ void NMEAParser::parseText(NMEASentence& nmea, string txt){ - if (txt.size() == 0){ + if (txt.empty()){ nmea.isvalid = false; return; } @@ -364,7 +364,7 @@ void NMEAParser::parseText(NMEASentence& nmea, string txt){ // Handle comma edge cases size_t comma = txt.find(','); if (comma == string::npos){ //comma not found, but there is a name... - if (txt.size() > 0) + if (!txt.empty()) { // the received data must just be the name if ( hasNonAlphaNum(txt) ){ nmea.isvalid = false; |
