list<string> split_list;
// first split the input list
- while (tmp.length())
+ while (tmp.length() != 0)
{
string name;
name = tmp;
else
tmp = "";
- while (name[0] == ' ')
+ while ((name.length() != 0) &&
+ (name[0] == ' '))
name.erase (0,1);
while (name[name.length()-1] == ' ')
name.erase (name.length()-1, 1);
{
if (*test_string == string(tmp, 0, tmp.find('|')))
{
+ // string found, quit
+ // loop. don't change
+ // tmp, since we don't
+ // need it anymore.
string_found = true;
- continue;
+ break;
};
tmp.erase (0, tmp.find('|')+1);
Patterns::PatternBase *
Patterns::MultipleSelection::clone () const {
- return new Patterns::Selection(sequence);
+ return new Patterns::MultipleSelection(sequence);
};
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams