FMT_NOEXCEPT -> noexcept
This commit is contained in:
+1
-1
@@ -325,7 +325,7 @@ template <typename Allocator, size_t MaxSize>
|
||||
class max_size_allocator : public Allocator {
|
||||
public:
|
||||
using typename Allocator::value_type;
|
||||
size_t max_size() const FMT_NOEXCEPT { return MaxSize; }
|
||||
size_t max_size() const noexcept { return MaxSize; }
|
||||
value_type* allocate(size_t n) {
|
||||
if (n > max_size()) {
|
||||
throw std::length_error("size > max_size");
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ output_redirect::output_redirect(FILE* f) : file_(f) {
|
||||
write_end.dup2(fd);
|
||||
}
|
||||
|
||||
output_redirect::~output_redirect() FMT_NOEXCEPT {
|
||||
output_redirect::~output_redirect() noexcept {
|
||||
try {
|
||||
restore();
|
||||
} catch (const std::exception& e) {
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ class output_redirect {
|
||||
|
||||
public:
|
||||
explicit output_redirect(FILE* file);
|
||||
~output_redirect() FMT_NOEXCEPT;
|
||||
~output_redirect() noexcept;
|
||||
|
||||
output_redirect(const output_redirect&) = delete;
|
||||
void operator=(const output_redirect&) = delete;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#else
|
||||
# define FMT_USE_FCNTL 0
|
||||
#endif
|
||||
#define FMT_NOEXCEPT noexcept
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
# define FMT_POSIX(call) _##call
|
||||
#else
|
||||
|
||||
+3
-3
@@ -236,14 +236,14 @@ namespace fake_qt {
|
||||
class QString {
|
||||
public:
|
||||
QString(const wchar_t* s) : s_(s) {}
|
||||
const wchar_t* utf16() const FMT_NOEXCEPT { return s_.data(); }
|
||||
int size() const FMT_NOEXCEPT { return static_cast<int>(s_.size()); }
|
||||
const wchar_t* utf16() const noexcept { return s_.data(); }
|
||||
int size() const noexcept { return static_cast<int>(s_.size()); }
|
||||
|
||||
private:
|
||||
std::wstring s_;
|
||||
};
|
||||
|
||||
fmt::basic_string_view<wchar_t> to_string_view(const QString& s) FMT_NOEXCEPT {
|
||||
fmt::basic_string_view<wchar_t> to_string_view(const QString& s) noexcept {
|
||||
return {s.utf16(), static_cast<size_t>(s.size())};
|
||||
}
|
||||
} // namespace fake_qt
|
||||
|
||||
Reference in New Issue
Block a user