RemoteTagCache: use [[gnu::pure]]
This commit is contained in:
parent
78e49928b6
commit
4e84fa4a00
@ -68,20 +68,20 @@ class RemoteTagCache final {
|
|||||||
struct Hash : std::hash<std::string> {
|
struct Hash : std::hash<std::string> {
|
||||||
using std::hash<std::string>::operator();
|
using std::hash<std::string>::operator();
|
||||||
|
|
||||||
gcc_pure
|
[[gnu::pure]]
|
||||||
std::size_t operator()(const Item &item) const noexcept {
|
std::size_t operator()(const Item &item) const noexcept {
|
||||||
return std::hash<std::string>::operator()(item.uri);
|
return std::hash<std::string>::operator()(item.uri);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Equal {
|
struct Equal {
|
||||||
gcc_pure
|
[[gnu::pure]]
|
||||||
bool operator()(const Item &a,
|
bool operator()(const Item &a,
|
||||||
const Item &b) const noexcept {
|
const Item &b) const noexcept {
|
||||||
return a.uri == b.uri;
|
return a.uri == b.uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_pure
|
[[gnu::pure]]
|
||||||
bool operator()(const std::string &a,
|
bool operator()(const std::string &a,
|
||||||
const Item &b) const noexcept {
|
const Item &b) const noexcept {
|
||||||
return a == b.uri;
|
return a == b.uri;
|
||||||
|
Loading…
Reference in New Issue
Block a user