Skip to content

Commit

Permalink
Clang comma operator issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jagirhussan committed Aug 17, 2022
1 parent 78a741c commit 3372af6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ void BGDiffUndoManager::addState()

int rightDiffIndex1 = m_lastState.size() - 1;
int rightDiffIndex2 = snap.size() - 1;
while (rightDiffIndex1 >= 0 && rightDiffIndex2 >= 0 && rightDiffIndex1 > leftDiffIndex && rightDiffIndex2 > leftDiffIndex && snap[rightDiffIndex2] == m_lastState[rightDiffIndex1])
--rightDiffIndex1, --rightDiffIndex2;
while (rightDiffIndex1 >= 0 && rightDiffIndex2 >= 0 && rightDiffIndex1 > leftDiffIndex && rightDiffIndex2 > leftDiffIndex && snap[rightDiffIndex2] == m_lastState[rightDiffIndex1]){
--rightDiffIndex1;
--rightDiffIndex2;
}

int len1 = rightDiffIndex1 - leftDiffIndex + 1;
int len2 = rightDiffIndex2 - leftDiffIndex + 1;
Expand Down Expand Up @@ -223,4 +225,7 @@ int BGDiffUndoManager::availableRedoCount() const
}

} // namespace BondGraphEditorWindow
} // namespace OpenCOR
} // namespace OpenCOR



Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ along with this program. If not, see <https://gnu.org/licenses>.
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif


Expand All @@ -42,4 +43,7 @@ class UndoManagerInterface
virtual void restoreFromFile(QString path) = 0;
};
} // namespace BondGraphEditorWindow
} // namespace OpenCOR
} // namespace OpenCOR



0 comments on commit 3372af6

Please sign in to comment.