If '+' in Tle pattern, valid characters are '+', '-' and ' '
parent
2efcd7fa0c
commit
5829dbd88e
5
Tle.cpp
5
Tle.cpp
|
@ -176,7 +176,6 @@ bool Tle::IsValidPair(const std::string& line1, const std::string& line2) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!IsValidLine(line2, 2))
|
if (!IsValidLine(line2, 2))
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -251,8 +250,7 @@ bool Tle::ValidateLine(const std::string& line, const std::string& pattern) {
|
||||||
/*
|
/*
|
||||||
* if pattern value is '+' then either a '+' or a ' '
|
* if pattern value is '+' then either a '+' or a ' '
|
||||||
*/
|
*/
|
||||||
if (*line_itr != '+' && *line_itr != ' ')
|
if (*line_itr != '+' && *line_itr != '-' && *line_itr != ' ')
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +296,6 @@ void Tle::TrimLeft(std::string& str) {
|
||||||
|
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
str.erase(0, pos);
|
str.erase(0, pos);
|
||||||
|
|
||||||
else
|
else
|
||||||
str.clear();
|
str.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue