mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
C++23 fixes
This commit is contained in:
parent
15177768ac
commit
29c203fd54
6 changed files with 8 additions and 8 deletions
|
|
@ -10,7 +10,7 @@ String RandomString(int len)
|
||||||
r.Cat("\r\n");
|
r.Cat("\r\n");
|
||||||
else
|
else
|
||||||
r.Cat(Random(64) + 32);
|
r.Cat(Random(64) + 32);
|
||||||
return r;
|
return String(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Check(const String& data)
|
void Check(const String& data)
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ Image GeoFun::GetImage()
|
||||||
BufferPainter bp(ib, MODE_ANTIALIASED);
|
BufferPainter bp(ib, MODE_ANTIALIASED);
|
||||||
dc1.DoPaint0(bp, 1);
|
dc1.DoPaint0(bp, 1);
|
||||||
|
|
||||||
return ib;
|
return Image(ib);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeoFun::SaveToImageFile(String fileName)
|
void GeoFun::SaveToImageFile(String fileName)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Image CreateBall(int r, Color color)
|
||||||
int q = ((x - r) * (x - r) + (y - r) * (y - r)) * 256 / r2;
|
int q = ((x - r) * (x - r) + (y - r) * (y - r)) * 256 / r2;
|
||||||
a.a = q <= 255 ? q : 0;
|
a.a = q <= 255 ? q : 0;
|
||||||
}
|
}
|
||||||
return b;
|
return Image(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct BallMaker : ImageMaker {
|
struct BallMaker : ImageMaker {
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ void DockableCtrlImgsLook(Value* look, int i, int n)
|
||||||
Image ChCrop(const Value& element, Size canvas, Rect crop, Color baseline)
|
Image ChCrop(const Value& element, Size canvas, Rect crop, Color baseline)
|
||||||
{
|
{
|
||||||
ImageDraw draw(canvas);
|
ImageDraw draw(canvas);
|
||||||
ChPaint(draw, canvas, element);
|
ChPaint(draw, canvas, element);
|
||||||
if (!IsNull(baseline)) {
|
if (!IsNull(baseline)) {
|
||||||
draw.DrawLine(0, canvas.cy-1, canvas.cx+1, canvas.cy, 1, baseline);
|
draw.DrawLine(0, canvas.cy-1, canvas.cx+1, canvas.cy, 1, baseline);
|
||||||
}
|
}
|
||||||
|
|
@ -141,7 +141,7 @@ Image StandardHighlight(Color inside, Color border)
|
||||||
*(q++) = (i == 4 || j == 4 || !i || !j) ? border : inside;
|
*(q++) = (i == 4 || j == 4 || !i || !j) ? border : inside;
|
||||||
ib.SetHotSpot(Point(1, 1));
|
ib.SetHotSpot(Point(1, 1));
|
||||||
ib.Set2ndSpot(Point(3, 3));
|
ib.Set2ndSpot(Point(3, 3));
|
||||||
return ib;
|
return Image(ib);
|
||||||
}
|
}
|
||||||
|
|
||||||
Image AlphaHighlight(const Image& img, int alpha)
|
Image AlphaHighlight(const Image& img, int alpha)
|
||||||
|
|
@ -154,7 +154,7 @@ Image AlphaHighlight(const Image& img, int alpha)
|
||||||
ImageBuffer ib(temp);
|
ImageBuffer ib(temp);
|
||||||
ib.SetHotSpot(Point(1, 1));
|
ib.SetHotSpot(Point(1, 1));
|
||||||
ib.Set2ndSpot(Point(3, 3));
|
ib.Set2ndSpot(Point(3, 3));
|
||||||
return ib;
|
return Image(ib);
|
||||||
}
|
}
|
||||||
|
|
||||||
CH_STYLE(DockableCtrl, Style, StyleDefault)
|
CH_STYLE(DockableCtrl, Style, StyleDefault)
|
||||||
|
|
|
||||||
|
|
@ -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 255][C+75 ][C@(0.0.255)+75 ?][C+75
|
||||||
q ][C@(0.0.255)+75 :][C+75 ][C@3+75 0][C+75 ;]&]
|
q ][C@(0.0.255)+75 :][C+75 ][C@3+75 0][C+75 ;]&]
|
||||||
[s0;l320;%- [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+75%- &]
|
[s0;l320;C+75%- &]
|
||||||
[s0;l320;%- [*C@(0.0.255)+75 struct][C+75 BallMaker ][C@(0.0.255)+75 :][C+75
|
[s0;l320;%- [*C@(0.0.255)+75 struct][C+75 BallMaker ][C@(0.0.255)+75 :][C+75
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Image GetRect_(const Image& orig, const Rect &r) {
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ib;
|
return Image(ib);
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect Fit(const Size &frame, const Size &object) {
|
Rect Fit(const Size &frame, const Size &object) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue