Open aweinert-MIT opened 2 years ago
The MATLAB mex function, run_dynamics_fast is used by multiple repositories, including em-model-manned-bayes to simulate aircraft trajectories with a 6DOF physics model. There are various #define statements that define constants.
run_dynamics_fast
em-model-manned-bayes
#define
Per the Google C++ Style Guide for preprocessor macros:
Instead of using a macro to store a constant, use a const variable.
const
Using const instead of #define is a good best practice and should be implemented.
While the contributing guidelines does not define a style guide for C++, we currently recommend the Google C++ Style Guide for this issue.
Relation
The MATLAB mex function,
run_dynamics_fast
is used by multiple repositories, includingem-model-manned-bayes
to simulate aircraft trajectories with a 6DOF physics model. There are various#define
statements that define constants.Description
Per the Google C++ Style Guide for preprocessor macros:
Alternatives
Using
const
instead of#define
is a good best practice and should be implemented.Additional
While the contributing guidelines does not define a style guide for C++, we currently recommend the Google C++ Style Guide for this issue.