You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MortalityType enumerator, defined in ST_defines.h, is inconsistently used throughout the codebase. There are multiple instances where it is passed to a function but never used, and some places where hard-coded numerics are used in place of the actual enumerator. Here are all of the problems I could find:
Unused parameter
indiv_Kill_Partial accepts a MortalityType parameter but it is never used.
Incorrect usage
indiv_proportion_Kill accepts an int called killType, which is undoubtably intended to be a MortalityType value. In addition, killType is never used.
indiv_proportion_Recovery accepts an int called killType, which is undoubtably intended to be a MortalityType value. In addition, killType is never used.
indiv_Kill_Complete accepts an int called killType, which is undoubtably intended to be a MortalityType value. In addition, killType is never used.
Species_Proportion_Recovery accepts an int called killType, which is undoubtably intended to be a MortalityType value. killType is then passed to indiv_proportion_Recovery, which is listed above.
Species_Kill accepts an int called killType, which is undoubtably intended to be a MortalityType value. killType is then passed to indiv_Kill_Complete, which is listed above.
insertKillTypes in ST_sql.c is intended to insert the MortalityType codes and their meaning into the SQL database. One problem is that the values are hard-coded, so any changes to the MortalityType struct would not be reflected. Another problem is that we need to be consistent with our naming conventions (KillType vs MortalityType).
Correct usage
In the indiv_st struct a MortalityType field is declared.
The text was updated successfully, but these errors were encountered:
The MortalityType enumerator, defined in ST_defines.h, is inconsistently used throughout the codebase. There are multiple instances where it is passed to a function but never used, and some places where hard-coded numerics are used in place of the actual enumerator. Here are all of the problems I could find:
Unused parameter
Incorrect usage
Correct usage
In the indiv_st struct a MortalityType field is declared.
The text was updated successfully, but these errors were encountered: