From 5dc9ecc44740c34247076e1c26aa5b00f06595ea Mon Sep 17 00:00:00 2001 From: Heiko Thiel Date: Fri, 3 May 2019 16:31:20 +0200 Subject: Changes are done by run-clang-tidy -header-filter='.*' -checks='-*,readability-container-size-empty' -fix --- src/NMEAParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/NMEAParser.cpp') 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; -- cgit v1.2.3