| 1844 | namespace { |
| 1845 | struct CompareVariables { |
| 1846 | bool operator()(const Variable* a, const Variable* b) const { |
| 1847 | const int fileA = a->nameToken()->fileIndex(); |
| 1848 | const int fileB = b->nameToken()->fileIndex(); |
| 1849 | if (fileA != fileB) |
| 1850 | return fileA < fileB; |
| 1851 | const int lineA = a->nameToken()->linenr(); |
| 1852 | const int lineB = b->nameToken()->linenr(); |
| 1853 | if (lineA != lineB) |
| 1854 | return lineA < lineB; |
| 1855 | const int columnA = a->nameToken()->column(); |
| 1856 | const int columnB = b->nameToken()->column(); |
| 1857 | return columnA < columnB; |
| 1858 | } |
| 1859 | }; |
| 1860 | } |
| 1861 | |