Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -300,16 +300,16 @@ void DemandCalculator::CalcDemand(LinkGraphJob &job, const std::vector<bool> &re
continue;
}
int32 supply = scaler.EffectiveSupply(job[from_id], job[to_id]);
int32_t supply = scaler.EffectiveSupply(job[from_id], job[to_id]);
assert(supply > 0);
/* Scale the distance by mod_dist around max_distance */
int32 distance = this->max_distance - (this->max_distance -
(int32)DistanceMaxPlusManhattan(job[from_id].XY(), job[to_id].XY())) *
int32_t distance = this->max_distance - (this->max_distance -
(int32_t)DistanceMaxPlusManhattan(job[from_id].XY(), job[to_id].XY())) *
this->mod_dist / 100;
/* Scale the accuracy by distance around accuracy / 2 */
int32 divisor = this->accuracy * (this->mod_dist - 50) / 100 +
int32_t divisor = this->accuracy * (this->mod_dist - 50) / 100 +
this->accuracy * distance / this->max_distance + 1;
assert(divisor > 0);