mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Clarify why we don't check argument id
This commit is contained in:
parent
1e1ac6e964
commit
cb475cb884
@ -594,6 +594,8 @@ class basic_format_parse_context : private ErrorHandler {
|
|||||||
the next argument index and switches to the automatic indexing.
|
the next argument index and switches to the automatic indexing.
|
||||||
*/
|
*/
|
||||||
FMT_CONSTEXPR int next_arg_id() {
|
FMT_CONSTEXPR int next_arg_id() {
|
||||||
|
// Don't check if the argument id is valid to avoid overhead and because it
|
||||||
|
// will be checked during formatting anyway.
|
||||||
if (next_arg_id_ >= 0) return next_arg_id_++;
|
if (next_arg_id_ >= 0) return next_arg_id_++;
|
||||||
on_error("cannot switch from manual to automatic argument indexing");
|
on_error("cannot switch from manual to automatic argument indexing");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user