| 1785 | } |
| 1786 | |
| 1787 | static bool isNotEqual(std::pair<const Token*, const Token*> x, std::pair<const Token*, const Token*> y) |
| 1788 | { |
| 1789 | const Token* start1 = x.first; |
| 1790 | const Token* start2 = y.first; |
| 1791 | if (start1 == nullptr || start2 == nullptr) |
| 1792 | return false; |
| 1793 | while (start1 != x.second && start2 != y.second) { |
| 1794 | const Token* tok1 = skipCVRefs(start1, x.second); |
| 1795 | if (tok1 != start1) { |
| 1796 | start1 = tok1; |
| 1797 | continue; |
| 1798 | } |
| 1799 | const Token* tok2 = skipCVRefs(start2, y.second); |
| 1800 | if (tok2 != start2) { |
| 1801 | start2 = tok2; |
| 1802 | continue; |
| 1803 | } |
| 1804 | if (start1->str() != start2->str()) |
| 1805 | return true; |
| 1806 | start1 = start1->next(); |
| 1807 | start2 = start2->next(); |
| 1808 | } |
| 1809 | start1 = skipCVRefs(start1, x.second); |
| 1810 | start2 = skipCVRefs(start2, y.second); |
| 1811 | return !(start1 == x.second && start2 == y.second); |
| 1812 | } |
| 1813 | static bool isNotEqual(std::pair<const Token*, const Token*> x, const std::string& y, bool cpp, const Settings& settings) |
| 1814 | { |
| 1815 | TokenList tokenList(settings, cpp ? Standards::Language::CPP : Standards::Language::C); |