mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 02:28:15 +00:00
Micro-optimize argument retrieval
This commit is contained in:
parent
e7e9578ed4
commit
916ed99dab
@ -1129,8 +1129,9 @@ class basic_format_args {
|
|||||||
/** Returns the argument at specified index. */
|
/** Returns the argument at specified index. */
|
||||||
format_arg get(size_type index) const {
|
format_arg get(size_type index) const {
|
||||||
format_arg arg = do_get(index);
|
format_arg arg = do_get(index);
|
||||||
return arg.type_ == internal::named_arg_type ?
|
if (arg.type_ == internal::named_arg_type)
|
||||||
arg.value_.as_named_arg().template deserialize<Context>() : arg;
|
arg = arg.value_.as_named_arg().template deserialize<Context>();
|
||||||
|
return arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned max_size() const {
|
unsigned max_size() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user