bug?
Why ReSharper says that code is unreachable, but its working fine?
int pos[2] = { 0,0 };
for (auto element : str)
{
for (int i = 0; i < operandsSize; i++)
{
if (element == operands[i])
{
std::string tempstr;
pos[1] = str.find(element,pos[0]);
std::cout << std::endl << "pos 0 = " << pos[0] << " pos 1 = " << pos[1] << std::endl;
int var = pos[0];
if (pos[0] != pos[1]) {
//unreachable
do
{
tempstr += str[var];
std::cout << std::endl << " ZASHEL " << std::endl;
var++;
} while (var < pos[1]);
//unreachable
}
if (!tempstr.empty())
varsAndOps.push(tempstr);
tempstr = element;
if (!tempstr.empty())
varsAndOps.push(tempstr);
pos[0] = pos[1] + 1;
}
}
}
Please sign in to leave a comment.
Hello,
This is probably the same issue as https://youtrack.jetbrains.com/issue/RSCPP-28763, should get fixed in 2020.1 EAP 3.