This commit is contained in:
Laurent Perron
2025-02-16 15:22:47 +01:00
parent 6a339f633f
commit ba07856113
2 changed files with 3 additions and 2 deletions

View File

@@ -218,6 +218,7 @@ class FixedShapeBinaryTree {
template <typename TypeWithPushBack>
void PartitionIntervalIntoNodes(LeafIndex first_leaf, LeafIndex last_leaf,
TypeWithPushBack* result) const {
DCHECK_LE(first_leaf, last_leaf);
TreeNodeIndex prev(0);
TreeNodeIndex current = GetNodeStartOfRange(first_leaf, last_leaf);
if (current == Root()) {

View File

@@ -264,7 +264,7 @@ class OR_DLL TimeLimit {
* If the passed limit contain an external Boolean, replace the current one
* with it. Not that this does not change the secondary Boolean.
*/
void MergeWithGlobalTimeLimit(TimeLimit* other);
void MergeWithGlobalTimeLimit(const TimeLimit* other);
/**
* Overwrites the deterministic time limit with the new value.
@@ -484,7 +484,7 @@ inline void TimeLimit::ResetLimitFromParameters(const Parameters& parameters) {
parameters.max_deterministic_time());
}
inline void TimeLimit::MergeWithGlobalTimeLimit(TimeLimit* other) {
inline void TimeLimit::MergeWithGlobalTimeLimit(const TimeLimit* other) {
if (other == nullptr) return;
ResetTimers(
std::min(GetTimeLeft(), other->GetTimeLeft()),