Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/fmt/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class dynamic_arg_list {
public:
template <typename T, typename Arg> auto push(const Arg& arg) -> const T& {
auto new_node = std::unique_ptr<typed_node<T>>(new typed_node<T>(arg));
auto& value = new_node->value;
const auto& value = new_node->value;
new_node->next = std::move(head_);
head_ = std::move(new_node);
return value;
Expand Down
4 changes: 2 additions & 2 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ inline auto gmtime(std::time_t time) -> std::tm {
return handle(gmtime_r(&time_, &tm_));
}

inline auto handle(std::tm* tm) -> bool { return tm != nullptr; }
inline auto handle(const std::tm* tm) -> bool { return tm != nullptr; }

inline auto handle(detail::null<>) -> bool {
using namespace fmt::detail;
Expand All @@ -520,7 +520,7 @@ inline auto gmtime(std::time_t time) -> std::tm {

#if !FMT_MSC_VERSION
inline auto fallback(detail::null<>) -> bool {
std::tm* tm = std::gmtime(&time_);
const std::tm* tm = std::gmtime(&time_);
if (tm) tm_ = *tm;
return tm != nullptr;
}
Expand Down
8 changes: 4 additions & 4 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ template <typename OutputIt,
#if FMT_CLANG_VERSION >= 307 && !FMT_ICC_VERSION
__attribute__((no_sanitize("undefined")))
#endif
FMT_CONSTEXPR20 inline auto reserve(OutputIt it, size_t n) ->
typename OutputIt::value_type* {
FMT_CONSTEXPR20 inline auto
reserve(OutputIt it, size_t n) -> typename OutputIt::value_type* {
auto& c = get_container(it);
size_t size = c.size();
c.resize(size + n);
Expand Down Expand Up @@ -3944,8 +3944,8 @@ template <typename Locale> class format_facet : public Locale::facet {
explicit format_facet(string_view sep = "", std::string grouping = "\3",
std::string decimal_point = ".")
: separator_(sep.data(), sep.size()),
grouping_(grouping),
decimal_point_(decimal_point) {}
grouping_(std::move(grouping)),
decimal_point_(std::move(decimal_point)) {}

auto put(appender out, loc_value val, const format_specs& specs) const
-> bool {
Expand Down