Wireshark
5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ui
qt
utils
unique_name.h
Go to the documentation of this file.
1
9
10
#ifndef UNIQUE_NAME_H
11
#define UNIQUE_NAME_H
12
13
#include <QString>
14
24
template
<
typename
Cand
id
ate,
typename
IsTaken>
25
QString
uniqueName
(Candidate candidate, IsTaken isTaken)
26
{
27
for
(
int
n = 0; ; ++n) {
28
QString name = candidate(n);
29
if
(!isTaken(name))
30
return
name;
31
}
32
}
33
34
#endif
// UNIQUE_NAME_H
uniqueName
QString uniqueName(Candidate candidate, IsTaken isTaken)
Definition
unique_name.h:25
Generated by
1.15.0