more [[gnu::...]] attributes
This commit is contained in:
@@ -76,7 +76,7 @@ IcuCollateFinish() noexcept
|
||||
|
||||
#endif
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
int
|
||||
IcuCollate(std::string_view a, std::string_view b) noexcept
|
||||
{
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef MPD_ICU_COLLATE_HXX
|
||||
#define MPD_ICU_COLLATE_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
/**
|
||||
@@ -33,7 +31,7 @@ IcuCollateInit();
|
||||
void
|
||||
IcuCollateFinish() noexcept;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
int
|
||||
IcuCollate(std::string_view a, std::string_view b) noexcept;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef MPD_ICU_COMPARE_HXX
|
||||
#define MPD_ICU_COMPARE_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
#include "util/AllocatedString.hxx"
|
||||
|
||||
#include <string_view>
|
||||
@@ -63,15 +62,15 @@ public:
|
||||
IcuCompare(IcuCompare &&) = default;
|
||||
IcuCompare &operator=(IcuCompare &&) = default;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
operator bool() const noexcept {
|
||||
return needle != nullptr;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool operator==(const char *haystack) const noexcept;
|
||||
|
||||
gcc_pure
|
||||
[[gnu::pure]]
|
||||
bool IsIn(const char *haystack) const noexcept;
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef MPD_ICU_CONVERTER_HXX
|
||||
#define MPD_ICU_CONVERTER_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_ICU
|
||||
@@ -84,7 +83,6 @@ public:
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*/
|
||||
gcc_nonnull_all
|
||||
AllocatedString ToUTF8(std::string_view s) const;
|
||||
|
||||
/**
|
||||
@@ -92,7 +90,6 @@ public:
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*/
|
||||
gcc_nonnull_all
|
||||
AllocatedString FromUTF8(std::string_view s) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef MPD_ICU_WIN32_HXX
|
||||
#define MPD_ICU_WIN32_HXX
|
||||
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
class AllocatedString;
|
||||
@@ -30,14 +28,14 @@ template<typename T> class BasicAllocatedString;
|
||||
/**
|
||||
* Throws std::system_error on error.
|
||||
*/
|
||||
gcc_pure gcc_nonnull_all
|
||||
[[gnu::pure]]
|
||||
AllocatedString
|
||||
WideCharToMultiByte(unsigned code_page, std::wstring_view src);
|
||||
|
||||
/**
|
||||
* Throws std::system_error on error.
|
||||
*/
|
||||
gcc_pure gcc_nonnull_all
|
||||
[[gnu::pure]]
|
||||
BasicAllocatedString<wchar_t>
|
||||
MultiByteToWideChar(unsigned code_page, std::string_view src);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user