mirror of
https://github.com/louisrubet/rpn
synced 2025-01-20 10:26:37 +01:00
Suppress useless code
This commit is contained in:
parent
00c01524b4
commit
10b3622408
1 changed files with 5 additions and 8 deletions
11
src/parse.h
11
src/parse.h
|
@ -59,15 +59,12 @@ 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 += ">>";
|
|
||||||
i+=2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
tmp+=entry.at(i);
|
tmp+=entry.at(i);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue