Skip to content

Commit

Permalink
LONG_LONG_MAX --> LLONG_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Nov 6, 2024
1 parent 31318cc commit 96e2e41
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/wrench/services/compute/ComputeService.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <iostream>
#include <cfloat>
#include <climits>
#include <limits>

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

/***********************/
/** \cond DEVELOPER **/
Expand Down
3 changes: 2 additions & 1 deletion include/wrench/simgrid_S4U_util/S4U_Simulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <set>
#include <climits>
#include <limits>
#include <simgrid/s4u.hpp>
#include <simgrid/kernel/routing/ClusterZone.hpp>

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

public:
static void enableSMPI();
Expand Down
2 changes: 1 addition & 1 deletion src/wrench/services/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace wrench {
std::string string_value;
string_value = this->getPropertyValueAsString(property);
if (string_value == "infinity") {
return LONG_LONG_MAX;
return LLONG_MAX;
}
if (string_value == "zero") {
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/wrench/simgrid_S4U_util/S4U_Simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ namespace wrench {
" at host " + hostname + " has invalid size");
}
} else {
capacity = LONG_LONG_MAX;// Default size if no size property specified
capacity = LLONG_MAX;// Default size if no size property specified
}

return capacity;
Expand Down
2 changes: 1 addition & 1 deletion src/wrench/util/UnitParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace wrench {
try {
double value = parseValueWithUnit(string, units, "B"); // default: bytes
if (value == DBL_MAX) {
return LONG_LONG_MAX;
return LLONG_MAX;
} else {
return (sg_size_t) value;
}
Expand Down

0 comments on commit 96e2e41

Please sign in to comment.