summaryrefslogtreecommitdiff
path: root/src/GPSFix.cpp
diff options
context:
space:
mode:
authorckgt <ckarlsson25@gmail.com>2019-05-03 11:17:09 -0400
committerGitHub <noreply@github.com>2019-05-03 11:17:09 -0400
commitaf1651176e142d10b113d2fc322076917414db3c (patch)
treee658fd1bdb94d26deda65cbbdf39fe82c10c4dee /src/GPSFix.cpp
parentd8e490622a2693b4b49598d194aab1139d4e821b (diff)
parent5dc9ecc44740c34247076e1c26aa5b00f06595ea (diff)
Merge pull request #7 from SunBlack/readability-container-size-empty
via u/SunBlack: Check for empty container via .empty() instead of with .size()
Diffstat (limited to 'src/GPSFix.cpp')
-rw-r--r--src/GPSFix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GPSFix.cpp b/src/GPSFix.cpp
index 5cbb17f..b0e54e6 100644
--- a/src/GPSFix.cpp
+++ b/src/GPSFix.cpp
@@ -87,7 +87,7 @@ double GPSAlmanac::averageSNR(){
}
double GPSAlmanac::minSNR(){
double min = 9999999;
- if (satellites.size() == 0){
+ if (satellites.empty()){
return 0;
}
int32_t num_over_zero = 0;
@@ -397,7 +397,7 @@ std::string GPSFix::toString(){
<< " SNR: avg: " << almanac.averageSNR() << " dB [min: " << almanac.minSNR() << " dB, max:" << almanac.maxSNR() << " dB]" << endl;
ss << " < Almanac (" << almanac.percentComplete() << "%) >" << endl;
- if (almanac.satellites.size() == 0){
+ if (almanac.satellites.empty()){
ss << " > No satellite info in almanac." << endl;
}
for (size_t i = 0; i < almanac.satellites.size(); i++){