Skip to content

Commit

Permalink
Per #2979, minor changes to is_eq() calls to fix compiler warning mes…
Browse files Browse the repository at this point in the history
…sages
  • Loading branch information
JohnHalleyGotway committed Sep 26, 2024
1 parent dcbb207 commit 5fbc31a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/basic/vx_math/is_bad_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ inline int is_eq(float a, float b) {
return is_eq((double)a, (double)b);
}

inline int is_eq(double a, float b) {
return is_eq(a, (double)b);
}

inline int is_eq(float a, double b) {
return is_eq((double)a, b);
}

template <typename T>
inline int is_eq(T a, T b) {
return (a == b);
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/compute_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ void compute_aggregated_seeps_grid(const DataPlane &fcst_dp, const DataPlane &ob
float obs_value = obs_dp.get(ix, iy);
fcst_cat = obs_cat = bad_data_int;
seeps_score = bad_data_double;
if (!is_eq(fcst_value, -9999.0) && !is_eq(obs_value, -9999.0)) {
if (!is_bad_data(fcst_value) && !is_bad_data(obs_value)) {
SeepsScore *seeps_mpr = seeps_climo->get_record(ix, iy, fcst_value, obs_value);
if (seeps_mpr != nullptr) {
fcst_cat = seeps_mpr->fcst_cat;
Expand Down

0 comments on commit 5fbc31a

Please sign in to comment.