Merge pull request #6487 from janisozaur/includes

Remove limits.h from common.h
This commit is contained in:
Ted John 2017-11-26 22:08:51 +00:00 committed by GitHub
commit 86ec21016d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 7 deletions

View File

@ -14,6 +14,8 @@
*****************************************************************************/
#pragma endregion
#include <limits>
#include <openrct2-ui/windows/Window.h>
#include <openrct2/audio/audio.h>
@ -1446,8 +1448,8 @@ static void window_ride_update_overall_view(uint8 ride_index) {
tile_element_iterator_begin(&it);
sint32 minx = INT_MAX, miny = INT_MAX, minz = INT_MAX;
sint32 maxx = INT_MIN, maxy = INT_MIN, maxz = INT_MIN;
sint32 minx = std::numeric_limits<sint32>::max(), miny = std::numeric_limits<sint32>::max(), minz = std::numeric_limits<sint32>::max();
sint32 maxx = std::numeric_limits<sint32>::min(), maxy = std::numeric_limits<sint32>::min(), maxz = std::numeric_limits<sint32>::min();
while (tile_element_iterator_next(&it)) {
if (tile_element_get_type(it.element) != TILE_ELEMENT_TYPE_TRACK)

View File

@ -14,6 +14,7 @@
*****************************************************************************/
#pragma endregion
#include <limits>
#include <openrct2/config/Config.h>
#include <openrct2/windows/Intent.h>
#include <openrct2-ui/windows/Window.h>
@ -345,7 +346,7 @@ static void window_staff_list_tooldown(rct_window *w, rct_widgetindex widgetInde
uint16 spriteIndex;
rct_peep *peep, *closestPeep = nullptr;
sint32 closestPeepDistance = INT_MAX;
sint32 closestPeepDistance = std::numeric_limits<sint32>::max();
FOR_ALL_STAFF(spriteIndex, peep) {
if (peep->staff_type != selectedPeepType)
continue;

View File

@ -27,7 +27,6 @@
#endif
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>

View File

@ -17,6 +17,7 @@
#include "../common.h"
#include <ctype.h>
#include <limits.h>
#ifdef _WIN32
#include <windows.h>

View File

@ -14,6 +14,8 @@
*****************************************************************************/
#pragma endregion
#include <limits>
#include "../Context.h"
#include "../OpenRCT2.h"
#include "../audio/AudioMixer.h"
@ -13703,7 +13705,7 @@ static void peep_head_for_nearest_ride_type(rct_peep * peep, sint32 rideType)
// Pick the closest ride
sint32 closestRideIndex = -1;
sint32 closestRideDistance = INT_MAX;
sint32 closestRideDistance = std::numeric_limits<sint32>::max();
for (sint32 i = 0; i < numPotentialRides; i++)
{
ride = get_ride(potentialRides[i]);
@ -13835,7 +13837,7 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep * peep, sint32 rideTy
// Pick the closest ride
sint32 closestRideIndex = -1;
sint32 closestRideDistance = INT_MAX;
sint32 closestRideDistance = std::numeric_limits<sint32>::max();
for (sint32 i = 0; i < numPotentialRides; i++)
{
ride = get_ride(potentialRides[i]);

View File

@ -14,6 +14,8 @@
*****************************************************************************/
#pragma endregion
#include <limits.h>
#include "../audio/audio.h"
#include "../audio/AudioMixer.h"
#include "../cheats.h"

View File

@ -14,6 +14,8 @@
*****************************************************************************/
#pragma endregion
#include <limits>
#include "../core/Math.hpp"
#include "../core/Memory.hpp"
#include "../core/Util.hpp"
@ -513,7 +515,7 @@ extern "C"
}
rideIndex = -1;
sint32 resultDistance = INT_MAX;
sint32 resultDistance = std::numeric_limits<sint32>::max();
FOR_ALL_RIDES(i, ride)
{
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))