Used single quotes for single character in string::find algorithm, more efficient
This commit is contained in:
@@ -343,7 +343,7 @@ bool PATLineSpec::findPatternStart(std::ifstream& inFile, std::string& parmName
|
||||
(line.empty()) ) { //is cr/lf empty?
|
||||
continue;
|
||||
} else if (nameTag == "*") {
|
||||
commaPos = line.find(",",1);
|
||||
commaPos = line.find(',',1);
|
||||
if (commaPos != std::string::npos) {
|
||||
patternName = line.substr(1,commaPos-1);
|
||||
} else {
|
||||
@@ -396,7 +396,7 @@ std::vector<std::string> PATLineSpec::getPatternList(std::string& parmFile)
|
||||
std::string nameTag = line.substr(0,1); //dupl code here
|
||||
unsigned long int commaPos;
|
||||
if (nameTag == "*") { //found a pattern
|
||||
commaPos = line.find(",",1);
|
||||
commaPos = line.find(',',1);
|
||||
std::string patternName;
|
||||
if (commaPos != std::string::npos) {
|
||||
patternName = line.substr(1,commaPos-1);
|
||||
|
||||
Reference in New Issue
Block a user