opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
801 stars 324 forks source link

Incorrect use of i in fmt::format strings instead of d #3827

Closed AllisonJohn closed 4 months ago

AllisonJohn commented 5 months ago

Two files use 'i' in a format string ({:03i} and {:06i}) but according to the docs 'd' should be used for integer/decimal numbers. Using 'i' would probably be causing an error as mentioned in #3428.

The places where 'i' is used are: Line 48 of https://github.com/opensim-org/opensim-core/blob/main/OpenSim/Moco/MocoCasADiSolver/CasOCProblem.cpp Line 547 of https://github.com/opensim-org/opensim-core/blob/main/OpenSim/Moco/MocoCasADiSolver/MocoCasOCProblem.h

There might still be cases of incorrect formats in other files, these were the ones I found when searching for fmt with i}