Skip to content

Commit

Permalink
Inline trivial functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Sep 2, 2022
1 parent 48327a8 commit 75383a8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,11 @@ template <typename T> class buffer {
buffer(const buffer&) = delete;
void operator=(const buffer&) = delete;

auto begin() noexcept -> T* { return ptr_; }
auto end() noexcept -> T* { return ptr_ + size_; }
FMT_INLINE auto begin() noexcept -> T* { return ptr_; }
FMT_INLINE auto end() noexcept -> T* { return ptr_ + size_; }

auto begin() const noexcept -> const T* { return ptr_; }
auto end() const noexcept -> const T* { return ptr_ + size_; }
FMT_INLINE auto begin() const noexcept -> const T* { return ptr_; }
FMT_INLINE auto end() const noexcept -> const T* { return ptr_ + size_; }

/** Returns the size of this buffer. */
constexpr auto size() const noexcept -> size_t { return size_; }
Expand Down Expand Up @@ -1115,7 +1115,7 @@ auto get_buffer(OutputIt out) -> iterator_buffer<OutputIt, T> {
}

template <typename Buffer>
auto get_iterator(Buffer& buf) -> decltype(buf.out()) {
FMT_INLINE auto get_iterator(Buffer& buf) -> decltype(buf.out()) {
return buf.out();
}
template <typename T> auto get_iterator(buffer<T>& buf) -> buffer_appender<T> {
Expand Down Expand Up @@ -1715,7 +1715,7 @@ class locale_ref {
const void* locale_; // A type-erased pointer to std::locale.

public:
constexpr locale_ref() : locale_(nullptr) {}
constexpr FMT_INLINE locale_ref() : locale_(nullptr) {}
template <typename Locale> explicit locale_ref(const Locale& loc);

explicit operator bool() const noexcept { return locale_ != nullptr; }
Expand Down

0 comments on commit 75383a8

Please sign in to comment.