use [[gnu::pure]] instead of gcc_pure

This is semi-standard and doesn't require the util/Compiler.h header.
This commit is contained in:
Max Kellermann
2021-02-08 14:59:40 +01:00
committed by Max Kellermann
parent 01af2778ab
commit 6cdb3ff21e
20 changed files with 61 additions and 80 deletions

View File

@@ -30,8 +30,6 @@
#ifndef SYSTEM_ERROR_HXX
#define SYSTEM_ERROR_HXX
#include "util/Compiler.h"
#include <system_error> // IWYU pragma: export
#include <utility>
@@ -160,7 +158,7 @@ FormatFileNotFound(const char *fmt, Args&&... args) noexcept
#endif
}
gcc_pure
[[gnu::pure]]
inline bool
IsErrno(const std::system_error &e, int code) noexcept
{
@@ -168,7 +166,7 @@ IsErrno(const std::system_error &e, int code) noexcept
e.code().value() == code;
}
gcc_pure
[[gnu::pure]]
static inline bool
IsFileNotFound(const std::system_error &e) noexcept
{
@@ -180,7 +178,7 @@ IsFileNotFound(const std::system_error &e) noexcept
#endif
}
gcc_pure
[[gnu::pure]]
static inline bool
IsPathNotFound(const std::system_error &e) noexcept
{
@@ -192,7 +190,7 @@ IsPathNotFound(const std::system_error &e) noexcept
#endif
}
gcc_pure
[[gnu::pure]]
static inline bool
IsAccessDenied(const std::system_error &e) noexcept
{