From 283928bf5efab214881c1efcb12039e27ffe215f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 30 Mar 2025 12:51:16 +0200 Subject: [PATCH] fixes to some warnings in g++ c++20 --- graph.cpp | 2 +- hud.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graph.cpp b/graph.cpp index bfb7d561..9aa317fd 100644 --- a/graph.cpp +++ b/graph.cpp @@ -330,7 +330,7 @@ void drawLightning(const shiftmatrix& V) { void drawCurse(const shiftmatrix& V, eItem it) { #if CAP_QUEUE - float ds = ptick(450) + (it * 5.5); // Extra offset so both Gluttony and Repulsion are easily visible + float ds = ptick(450) + (int(it) * 5.5); // Extra offset so both Gluttony and Repulsion are easily visible color_t col = darkena(iinf[it].color, 0, 0xFF); for(int u=0; u<20; u++) { ld leng, rad; diff --git a/hud.cpp b/hud.cpp index 88a4cad2..ba44d3c5 100644 --- a/hud.cpp +++ b/hud.cpp @@ -73,7 +73,7 @@ bool ikappear(int i) { return ikmerge(i); } -const int glyphs = ittypes + motypes; +const int glyphs = int(ittypes) + int(motypes); int gfirsttime[glyphs], glasttime[glyphs], gcopy[glyphs], ikland[glyphs]; int glyphorder[glyphs]; @@ -302,7 +302,7 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int qty < 100 ? buttonsize / 2 : buttonsize / 3; - if(id == moMutant + ittypes && clearing::imputed.nonzero()) { + if(id == int(moMutant) + int(ittypes) && clearing::imputed.nonzero()) { bignum bn = clearing::imputed + qty; str = short_form(bn); bsize = buttonsize / 4;