File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,14 @@ std::optional<double> SanitizerMaskCutoffs::operator[](unsigned Kind) const {
4444
4545void SanitizerMaskCutoffs::clear (SanitizerMask K) { set (K, 0 ); }
4646
47- std::optional<std::vector<int >>
48- SanitizerMaskCutoffs::getAllScaled (int ScalingFactor) const {
47+ std::optional<std::vector<unsigned >>
48+ SanitizerMaskCutoffs::getAllScaled (unsigned ScalingFactor) const {
4949 std::vector<int > ScaledCutoffs;
5050
5151 bool AnyCutoff = false ;
5252 for (unsigned int i = 0 ; i < SanitizerKind::SO_Count; ++i) {
5353 auto C = (*this )[i];
54- ScaledCutoffs.push_back (C.has_value () ? lround (ScalingFactor * *C) : 0 );
54+ ScaledCutoffs.push_back (C.has_value () ? lround (std::clamp ( ScalingFactor, 0.0 , 1.0 ) * *C) : 0 );
5555 AnyCutoff |= C.has_value ();
5656 }
5757
You can’t perform that action at this time.
0 commit comments