mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-27 07:52:09 +00:00
Replaced snap util function with std::clamp.
This commit is contained in:
@@ -893,7 +893,7 @@ float64 DocumentData::progress() const {
|
||||
if (uploadingData->size > 0) {
|
||||
const auto result = float64(uploadingData->offset)
|
||||
/ uploadingData->size;
|
||||
return snap(result, 0., 1.);
|
||||
return std::clamp(result, 0., 1.);
|
||||
}
|
||||
return 0.;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user