C++23 fixes

This commit is contained in:
Mirek Fidler 2024-09-21 09:57:02 +02:00
parent 15177768ac
commit 29c203fd54
6 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ String RandomString(int len)
r.Cat("\r\n");
else
r.Cat(Random(64) + 32);
return r;
return String(r);
}
void Check(const String& data)

View file

@ -134,7 +134,7 @@ Image GeoFun::GetImage()
BufferPainter bp(ib, MODE_ANTIALIASED);
dc1.DoPaint0(bp, 1);
return ib;
return Image(ib);
}
void GeoFun::SaveToImageFile(String fileName)

View file

@ -16,7 +16,7 @@ Image CreateBall(int r, Color color)
int q = ((x - r) * (x - r) + (y - r) * (y - r)) * 256 / r2;
a.a = q <= 255 ? q : 0;
}
return b;
return Image(b);
}
struct BallMaker : ImageMaker {

View file

@ -141,7 +141,7 @@ Image StandardHighlight(Color inside, Color border)
*(q++) = (i == 4 || j == 4 || !i || !j) ? border : inside;
ib.SetHotSpot(Point(1, 1));
ib.Set2ndSpot(Point(3, 3));
return ib;
return Image(ib);
}
Image AlphaHighlight(const Image& img, int alpha)
@ -154,7 +154,7 @@ Image AlphaHighlight(const Image& img, int alpha)
ImageBuffer ib(temp);
ib.SetHotSpot(Point(1, 1));
ib.Set2ndSpot(Point(3, 3));
return ib;
return Image(ib);
}
CH_STYLE(DockableCtrl, Style, StyleDefault)

View file

@ -539,7 +539,7 @@ r) ][C@(0.0.255)+75 `+][C+75 (y ][C@(0.0.255)+75 `-][C+75 r) ][C@(0.0.255)+75
q ][C@(0.0.255)+75 <`=][C+75 ][C@3+75 255][C+75 ][C@(0.0.255)+75 ?][C+75
q ][C@(0.0.255)+75 :][C+75 ][C@3+75 0][C+75 ;]&]
[s0;l320;%- [C+75 `}]&]
[s0;l320;%- [C+75 ][*_C@(128.0.255)+75 return][C+75 b;]&]
[s0;l320;%- [C+75 ][*_C@(128.0.255)+75 return][C+75 Image(b);]&]
[s0;l320;%- [C+75 `}]&]
[s0;l320;C+75%- &]
[s0;l320;%- [*C@(0.0.255)+75 struct][C+75 BallMaker ][C@(0.0.255)+75 :][C+75

View file

@ -17,7 +17,7 @@ Image GetRect_(const Image& orig, const Rect &r) {
s++;
}
}
return ib;
return Image(ib);
}
Rect Fit(const Size &frame, const Size &object) {