Skip to content

Commit

Permalink
fix: format spec typos (#4172)
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Mar 11, 2024
1 parent fafbafe commit 418555c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/include/OpenImageIO/detail/fmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct index_formatter : format_parser_with_separator {
// fmtlib custom formatter that formats a type `T` as if it were an array
// `Elem[Size]` (and it must be laid out that way in memory). The formatting
// spec will apply to each element. For example, if the object has 3 float
// elements and the spec is "{.3f}", then the output might be "1.234 2.345
// elements and the spec is "{:.3f}", then the output might be "1.234 2.345
// 3.456".
//
// In addition to the usual formatting spec, we also recognize the following
Expand Down
2 changes: 1 addition & 1 deletion src/oiiotool/printinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ print_info_subimage(std::ostream& out, Oiiotool& ot, int current_subimage,
if (opt.sum) {
imagesize_t imagebytes = spec.image_bytes(true);
// totalsize += imagebytes;
lines[0] += format(" ({.2f} MB)",
lines[0] += format(" ({:.2f} MB)",
(float)imagebytes / (1024.0 * 1024.0));
}
std::string file_format_name;
Expand Down

0 comments on commit 418555c

Please sign in to comment.