[go: up one dir, main page]

Menu

[735b18]: / types.cpp  Maximize  Restore  History

Download this file

45 lines (35 with data), 785 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "types.h"
FileLine::FileLine(QString f, int l)
: file(f), line(l)
{
}
bool FileLine::operator==(FileLine &f) const
{
return file == f.file && line == f.line;
}
uint qHash(const FileLine &f)
{
return qHash(f.file) ^ qHash(f.line);
}
bool operator< ( const FileLine &a, const FileLine &b )
{
if ( a.file == b.file ) return a.line < b.line;
return a.file < b.file;
}
FileLabel::FileLabel(QString f, QString l)
: file(f), label(l)
{
}
bool FileLabel::operator==(FileLabel &f) const
{
return file == f.file && label == f.label;
}
uint qHash(const FileLabel &f)
{
return qHash(f.file) ^ qHash(f.label);
}
bool operator< ( const FileLabel &a, const FileLabel &b )
{
if ( a.file == b.file ) return a.label < b.label;
return a.file < b.file;
}