X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d800adcfdddbc6283a830288babe78a59a3ae079..7d195832dafde68afd749dd614e9a14d697bdb92:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index f6eeaa0f76..df62d8a3ab 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -65,12 +65,13 @@ void CpuImpl::reset_vcpu(CpuImpl* that) this->speed_per_pstate_.assign(that->speed_per_pstate_.begin(), that->speed_per_pstate_.end()); } -CpuImpl* CpuImpl::set_pstate(int pstate_index) +CpuImpl* CpuImpl::set_pstate(unsigned long pstate_index) { - xbt_assert(pstate_index <= static_cast(speed_per_pstate_.size()), - "Invalid parameters for CPU %s (pstate %d > length of pstates %d). Please fix your platform file, or your " - "call to change the pstate.", - get_cname(), pstate_index, static_cast(speed_per_pstate_.size())); + xbt_assert( + pstate_index <= speed_per_pstate_.size(), + "Invalid parameters for CPU %s (pstate %lu > length of pstates %lu). Please fix your platform file, or your " + "call to change the pstate.", + get_cname(), pstate_index, speed_per_pstate_.size()); double new_peak_speed = speed_per_pstate_[pstate_index]; pstate_ = pstate_index; @@ -89,10 +90,9 @@ CpuImpl* CpuImpl::set_pstate_speed(const std::vector& speed_per_state) return this; } -double CpuImpl::get_pstate_peak_speed(int pstate_index) const +double CpuImpl::get_pstate_peak_speed(unsigned long pstate_index) const { - xbt_assert((pstate_index <= static_cast(speed_per_pstate_.size())), - "Invalid parameters (pstate index out of bounds)"); + xbt_assert((pstate_index <= speed_per_pstate_.size()), "Invalid parameters (pstate index out of bounds)"); return speed_per_pstate_[pstate_index]; }