Toonz

Copy-Paste

V517 The use of ‘if (A) {…} else if (A) {…}’ pattern was detected. There is a probability of logical error presence. Check lines: 1448, 1454. tcenterlineskeletonizer.cpp 1448

inline void Event::processVertexEvent()
{
  ....
  if (newLeftNode->m_concave) {       
    newLeftNode->m_notOpposites = m_generator->m_notOpposites;
    append<vector<ContourEdge *>, vector<ContourEdge *>::....

    newLeftNode->m_notOpposites.push_back(newRightNode->m_edge);
    newLeftNode->m_notOpposites.push_back(newRightNode->....);
  } else if (newLeftNode->m_concave) { 
    newRightNode->m_notOpposites = m_generator->m_notOpposites;
    append<vector<ContourEdge *>, vector<ContourEdge *>::....

    newRightNode->m_notOpposites.push_back(newLeftNode->m_edge);
    newRightNode->m_notOpposites.push_back(newLeftNode->....);
  }
  ....
}

We see that newLeftNode and newRightNode variables are confused in the conditions. As a result of this error, the else branch is never executed. Most probably, one of the conditions should be as follows:

if (newRightNode-> m_concave)

Please click here to see more bugs from this project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s