1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-26 04:57:40 +00:00

Miscelaneous code improvements

This commit is contained in:
Carles Fernandez
2018-12-04 13:20:49 +01:00
parent bdb912e9da
commit 7261bec2ad
21 changed files with 44 additions and 90 deletions

View File

@@ -69,7 +69,7 @@ DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter,
static bool ValidateC(const char* flagname, const std::string& value)
{
if (boost::filesystem::exists(value) or value.compare("-") == 0) // value is ok
if (boost::filesystem::exists(value) or value == "-") // value is ok
return true;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
@@ -78,7 +78,7 @@ static bool ValidateC(const char* flagname, const std::string& value)
static bool ValidateConfigFile(const char* flagname, const std::string& value)
{
if (boost::filesystem::exists(value) or value.compare(std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf")) == 0) // value is ok
if (boost::filesystem::exists(value) or value == std::string(GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/default.conf")) // value is ok
return true;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
@@ -87,7 +87,7 @@ static bool ValidateConfigFile(const char* flagname, const std::string& value)
static bool ValidateS(const char* flagname, const std::string& value)
{
if (boost::filesystem::exists(value) or value.compare("-") == 0) // value is ok
if (boost::filesystem::exists(value) or value == "-") // value is ok
return true;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
@@ -96,7 +96,7 @@ static bool ValidateS(const char* flagname, const std::string& value)
static bool ValidateSignalSource(const char* flagname, const std::string& value)
{
if (boost::filesystem::exists(value) or value.compare("-") == 0) // value is ok
if (boost::filesystem::exists(value) or value == "-") // value is ok
return true;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;

View File

@@ -153,7 +153,7 @@ gr::basic_block_sptr Pass_Through::get_left_block()
{
return conjugate_sc_;
}
else if (item_type_ == "cbyte")
if (item_type_ == "cbyte")
{
return conjugate_ic_;
}
@@ -180,7 +180,7 @@ gr::basic_block_sptr Pass_Through::get_right_block()
{
return conjugate_sc_;
}
else if (item_type_ == "cbyte")
if (item_type_ == "cbyte")
{
return conjugate_ic_;
}