mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: replace MIN and MAX macrors by standard versions
In C++ files, replace MIN and MAX by std::min and std::max, respectively. There are still a few C files using these macros. Convert them in due course. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b89029353f
commit
ec0bc2d06c
6 changed files with 16 additions and 16 deletions
|
@ -79,7 +79,7 @@ extern "C" int get_maxtime(const struct plot_info *pi)
|
|||
{
|
||||
int seconds = pi->maxtime;
|
||||
int min = prefs.zoomed_plot ? 30 : 30 * 60;
|
||||
return MAX(min, seconds);
|
||||
return std::max(min, seconds);
|
||||
}
|
||||
|
||||
/* get the maximum depth to which we want to plot */
|
||||
|
@ -87,7 +87,7 @@ extern "C" int get_maxdepth(const struct plot_info *pi)
|
|||
{
|
||||
/* 3m to spare */
|
||||
int mm = pi->maxdepth + 3000;
|
||||
return prefs.zoomed_plot ? mm : MAX(30000, mm);
|
||||
return prefs.zoomed_plot ? mm : std::max(30000, mm);
|
||||
}
|
||||
|
||||
/* UNUSED! */
|
||||
|
@ -1265,7 +1265,7 @@ static void fill_o2_values(const struct dive *dive, const struct divecomputer *d
|
|||
} // having initialised the empty o2 sensor values for this point on the profile,
|
||||
amb_pressure.mbar = depth_to_mbar(entry->depth, dive);
|
||||
o2pressure.mbar = calculate_ccr_po2(entry, dc); // ...calculate the po2 based on the sensor data
|
||||
entry->o2pressure.mbar = MIN(o2pressure.mbar, amb_pressure.mbar);
|
||||
entry->o2pressure.mbar = std::min(o2pressure.mbar, amb_pressure.mbar);
|
||||
} else {
|
||||
entry->o2pressure.mbar = 0; // initialise po2 to zero for dctype = OC
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue