mirror of
https://github.com/louisrubet/rpn
synced 2025-02-06 08:46:31 +01:00
Suppress useless code
This commit is contained in:
parent
0fe7e735ec
commit
e90c5c1e49
1 changed files with 5 additions and 8 deletions
13
src/parse.h
13
src/parse.h
|
@ -59,16 +59,13 @@ static bool _cut(const string& entry, vector<string>& entries)
|
||||||
//get expression
|
//get expression
|
||||||
i+=2;
|
i+=2;
|
||||||
tmp = "<<";
|
tmp = "<<";
|
||||||
|
// trim leading spaces
|
||||||
|
while (i<entry.size() && (entry.at(i)==' ' || entry.at(i)=='\t'))
|
||||||
|
i++;
|
||||||
|
//get the rest
|
||||||
while(i<entry.size())
|
while(i<entry.size())
|
||||||
{
|
{
|
||||||
if (i<(entry.size()-1) && entry.at(i) == '>' && entry.at(i+1) == '>')
|
tmp+=entry.at(i);
|
||||||
{
|
|
||||||
tmp += ">>";
|
|
||||||
i+=2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
tmp+=entry.at(i);
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
entries.push_back(tmp);
|
entries.push_back(tmp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue