Skip to content

Commit 96e2e41

Browse files
committed
LONG_LONG_MAX --> LLONG_MAX
1 parent 31318cc commit 96e2e41

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

include/wrench/services/compute/ComputeService.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <iostream>
1616
#include <cfloat>
1717
#include <climits>
18+
#include <limits>
1819

1920
#include "wrench/services/Service.h"
2021
#include "wrench/job/Job.h"
@@ -53,7 +54,7 @@ namespace wrench {
5354
/** @brief A convenient constant to mean "use all ram of a physical host" whenever a ram capacity
5455
* is needed when instantiating compute services
5556
*/
56-
static constexpr sg_size_t ALL_RAM = LONG_LONG_MAX;
57+
static constexpr sg_size_t ALL_RAM = LONG_MAX;
5758

5859
/***********************/
5960
/** \cond DEVELOPER **/

include/wrench/simgrid_S4U_util/S4U_Simulation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <set>
1515
#include <climits>
16+
#include <limits>
1617
#include <simgrid/s4u.hpp>
1718
#include <simgrid/kernel/routing/ClusterZone.hpp>
1819

@@ -29,7 +30,7 @@ namespace wrench {
2930
class S4U_Simulation {
3031
public:
3132
/** @brief The ram capacity of a physical host whenever not specified in the platform description file */
32-
static constexpr sg_size_t DEFAULT_RAM = LONG_LONG_MAX;
33+
static constexpr sg_size_t DEFAULT_RAM = LLONG_MAX;
3334

3435
public:
3536
static void enableSMPI();

src/wrench/services/Service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ namespace wrench {
151151
std::string string_value;
152152
string_value = this->getPropertyValueAsString(property);
153153
if (string_value == "infinity") {
154-
return LONG_LONG_MAX;
154+
return LLONG_MAX;
155155
}
156156
if (string_value == "zero") {
157157
return 0;

src/wrench/simgrid_S4U_util/S4U_Simulation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ namespace wrench {
11111111
" at host " + hostname + " has invalid size");
11121112
}
11131113
} else {
1114-
capacity = LONG_LONG_MAX;// Default size if no size property specified
1114+
capacity = LLONG_MAX;// Default size if no size property specified
11151115
}
11161116

11171117
return capacity;

src/wrench/util/UnitParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ namespace wrench {
112112
try {
113113
double value = parseValueWithUnit(string, units, "B"); // default: bytes
114114
if (value == DBL_MAX) {
115-
return LONG_LONG_MAX;
115+
return LLONG_MAX;
116116
} else {
117117
return (sg_size_t) value;
118118
}

0 commit comments

Comments
 (0)