diff --git a/achievement.cpp b/achievement.cpp index 92a8b4a8..374ebe7b 100644 --- a/achievement.cpp +++ b/achievement.cpp @@ -964,7 +964,7 @@ EX void achievement_display() { EX bool isAscending(int i) { return i == 13 || i == 14 || i == 15 || i == 16 || i == 29 || i == 30 || i == 45; - }; + } EX int score_default(int i) { if(isAscending(i)) return 1999999999; diff --git a/archimedean.cpp b/archimedean.cpp index 14b6fbc4..ac5addbd 100644 --- a/archimedean.cpp +++ b/archimedean.cpp @@ -1144,7 +1144,7 @@ function setcanvas(char c) { patterns::whichCanvas = c; start_game(); }; - }; + } EX void show() { if(lastsample < isize(samples)) { diff --git a/classes.cpp b/classes.cpp index 45be9060..00f6ab7e 100644 --- a/classes.cpp +++ b/classes.cpp @@ -931,7 +931,7 @@ namespace mf { static const flagtype band = (cylindrical | pseudocylindrical | uses_bandshift); static const flagtype pseudoband = (pseudocylindrical | uses_bandshift); - }; + } struct modelinfo { const char *name_hyperbolic; diff --git a/dialogs.cpp b/dialogs.cpp index 43444ed9..8146aa87 100644 --- a/dialogs.cpp +++ b/dialogs.cpp @@ -37,7 +37,7 @@ EX namespace dialog { bool positive; }; - static inline ld identity_f(ld x) { return x; }; + static inline ld identity_f(ld x) { return x; } const static scaler identity = {identity_f, identity_f, false}; const static scaler logarithmic = {log, exp, true}; @@ -100,7 +100,7 @@ EX namespace dialog { if(clicked) hr::displayfr(x * zoomf + shiftx, y * zoomf + shifty, b, size * zoomf, s, hicolor, align); return clicked; } - EX }; + EX } #if CAP_MENUSCALING && CAP_SDL EX void handleZooming(SDL_Event &ev) { @@ -142,7 +142,7 @@ EX namespace dialog { EX void handler(int sym, int uni) { dialog::handleNavigation(sym, uni); if(doexiton(sym, uni)) popScreen(); - }; + } EX void init() { items.clear(); @@ -1268,6 +1268,6 @@ EX namespace dialog { } #endif - }; + } } diff --git a/euclid.cpp b/euclid.cpp index 67879159..795684b8 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -459,7 +459,7 @@ EX namespace euc { cat += val * main_axes[i]; } return cat; - }; + } EX bool valid_third_turn(const intmatrix& m) { if(m[0][2] != -m[0][0]-m[0][1]) return false; @@ -630,7 +630,7 @@ EX namespace euc { int diagonal_cross(const coord& a, const coord& b) { return a[0]*b[1] + a[1]*b[2] + a[2]*b[0] - b[0]*a[1] - b[1]*a[2] - b[2]*a[0]; - }; + } void torus_config_full::canonicalize(coord& x, coord& d, transmatrix& M, bool& mirr) { if(!twisted) { diff --git a/graph.cpp b/graph.cpp index 836ec3c6..dfa33545 100644 --- a/graph.cpp +++ b/graph.cpp @@ -483,7 +483,7 @@ EX namespace tortoise { return gradient(0x487830, mcol, 0, dd, 0xFF); } - EX }; + EX } double footfun(double d) { d -= floor(d); @@ -5019,7 +5019,7 @@ namespace sm { static const int DIALOG_STRICT_X = 32768; // do not interpret dialog clicks outside of the X region static const int EXPANSION = (1<<16); static const int HEXEDIT = (1<<17); - }; + } #endif EX int cmode; diff --git a/help.cpp b/help.cpp index 05c1f32c..85ceea49 100644 --- a/help.cpp +++ b/help.cpp @@ -755,11 +755,11 @@ void gotoHelpFor(eItem i) { void gotoHelpFor(eWall w) { help = generateHelpForWall(w); - }; + } void gotoHelpFor(eMonster m) { help = generateHelpForMonster(m); - }; + } EX void appendHelp(string s) { auto h = helpgenerator; diff --git a/hypgraph.cpp b/hypgraph.cpp index d6d39b67..1ab9d276 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -307,7 +307,7 @@ hyperpoint compute_hybrid(hyperpoint H, int rootid) { return ret; } -EX ld signed_sqrt(ld x) { return x > 0 ? sqrt(x) : -sqrt(-x); }; +EX ld signed_sqrt(ld x) { return x > 0 ? sqrt(x) : -sqrt(-x); } EX void applymodel(hyperpoint H, hyperpoint& ret) { diff --git a/landlock.cpp b/landlock.cpp index 5e204c20..6c753798 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -516,7 +516,7 @@ namespace lv { static const flagtype appears_in_ptm = 8; static const flagtype display_in_help = 16; static const flagtype one_and_half = 32; - }; + } struct land_validity_t { int quality_level; // 0 (dont show), 1 (1/2), 2 (ok), 3(1!) diff --git a/langen.cpp b/langen.cpp index 03a911c3..531ececb 100644 --- a/langen.cpp +++ b/langen.cpp @@ -325,7 +325,7 @@ int main() { printf("#define NUMEXTRA %d\n", isize(vchars)); printf("#define NATCHARS {"); for(auto&& elt : vchars) printf("\"%s\",", elt.c_str()); - printf("};\n"); + printf("}\n"); printf("extern const char* natchars[NUMEXTRA];\n"); printf("#endif\n"); printf("#endif\n"); diff --git a/mapeditor.cpp b/mapeditor.cpp index b7bae2c0..2258e102 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -2141,7 +2141,7 @@ namespace mapeditor { addHook(hooks_removecells, 0, [] () { modelcell.clear(); set_if_removed(mapeditor::copysource.at, NULL); - });;; + }); #endif EX void initdraw(cell *c) { diff --git a/pattern2.cpp b/pattern2.cpp index 37919c38..eeae7d54 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -2889,7 +2889,7 @@ EX namespace linepatterns { dialog::display(); } - }; + } int val46(cell *c) { patterns::patterninfo si; diff --git a/raycaster.cpp b/raycaster.cpp index 5af5f95f..a5050bc4 100644 --- a/raycaster.cpp +++ b/raycaster.cpp @@ -136,7 +136,7 @@ struct raycaster : glhr::GLprogram { shared_ptr our_raycaster; -EX void reset_raycaster() { our_raycaster = nullptr; }; +EX void reset_raycaster() { our_raycaster = nullptr; } int deg; @@ -846,7 +846,7 @@ array enc(int i, int a) { res[0] = ((i%per_row) * deg + a + .5) / length; res[1] = ((i / per_row) + .5) / rows; return res; - }; + } color_t color_out_of_range = 0x0F0800FF; diff --git a/rogueviz/newconf.cpp b/rogueviz/newconf.cpp index 3bec3436..b666d3ba 100644 --- a/rogueviz/newconf.cpp +++ b/rogueviz/newconf.cpp @@ -120,7 +120,7 @@ struct coord { char out = '-'; -char& fmap_at(coord c) { return c.x >= 0 && c.x < isize(fmap[0]) && c.y >= 0 && c.y < isize(fmap) ? fmap[c.y][c.x] : out; }; +char& fmap_at(coord c) { return c.x >= 0 && c.x < isize(fmap[0]) && c.y >= 0 && c.y < isize(fmap) ? fmap[c.y][c.x] : out; } ld vx[256][256], vy[256][256]; @@ -398,7 +398,7 @@ void changepoint(int x, int y, bool can_add) { for(int k=0; k<4; k++) if(!live[k]) fmap_at(cc+k) = '0'; } - }; + } bool showmenu = true; diff --git a/rogueviz/rogueviz.cpp b/rogueviz/rogueviz.cpp index 2c4909b6..5cb963d3 100644 --- a/rogueviz/rogueviz.cpp +++ b/rogueviz/rogueviz.cpp @@ -2474,7 +2474,7 @@ auto hooks = addHook(hooks_markers, 100, search_marker) + 0; -}; +} #include "kohonen.cpp" #include "staircase.cpp" diff --git a/surface.cpp b/surface.cpp index fa78830d..ad2de140 100644 --- a/surface.cpp +++ b/surface.cpp @@ -192,7 +192,7 @@ bool flag_clamp_max(ld& coord, ld maxv) { bool flag_clamp(ld& coord, ld minv, ld maxv) { return flag_clamp_min(coord, minv) & flag_clamp_max(coord, maxv); - }; + } bool flag_clamp_sym(ld& coord, ld v) { return flag_clamp(coord, -v, v); diff --git a/system.cpp b/system.cpp index b6c6241d..8a4d6dd0 100644 --- a/system.cpp +++ b/system.cpp @@ -1572,5 +1572,5 @@ addHook(hooks_removecells, 0, [] () { eliminate_if(butterflies, [] (pair& p) { return is_cell_removed(p.first); }); for(int i=0; i