MSC warnings fixed, CtrlLib: .lay UNTYPED now without properties

This commit is contained in:
Mirek Fidler 2022-05-14 08:47:02 +02:00
parent 76cc33f2f1
commit 6a86f2ac03
8 changed files with 42 additions and 37 deletions

View file

@ -21,7 +21,7 @@ struct scImageMaker : ValueMaker {
if(paintonly && !IsNull(img) && img.GetRefCount() == 1)
SetPaintOnly__(img);
object = img;
return img.GetLength() + 64;
return (int)min((size_t) INT_MAX, img.GetLength()) + 64;
}
};
@ -36,7 +36,7 @@ void SysImageRealized(const Image& img)
ValueCacheAdjustSize([](const Value& v) -> int {
if(v.Is<Image>()) {
const Image& img = v.To<Image>();
return 64 + (~img ? img.GetLength() : 0);
return 64 + (~img ? (int)min((size_t) INT_MAX, img.GetLength()) : 0);
}
return -1;
});