mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-06 12:27:57 +00:00
Replace const X f()
with X f()
. NFC.
Theoretically, this improves codegen by allowing `x = f()` to move-from the returned temporary instead of requiring a copy. In these cases I don't expect any effect; it's just to keep the codebase clean. Also change `operator"" _deg` to `operator""_deg`; the former spelling was deprecated in 2023 (but, strangely, was deprecated retroactively all the way back to C++11: see CWG2521).
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
#include "hyper.h"
|
||||
namespace hr {
|
||||
|
||||
EX const string dnameof(eMonster m) { return m >= 0 && m < motypes ? minf[m].name : hr::format("[MONSTER %d]", m); }
|
||||
EX const string dnameof(eLand l) { return l >= 0 && l < landtypes ? linf[l].name : hr::format("[LAND %d]", l); }
|
||||
EX const string dnameof(eWall w) { return w >= 0 && w < walltypes ? winf[w].name : hr::format("[WALL %d]", w); }
|
||||
EX const string dnameof(eItem i) { return i >= 0 && i < ittypes ? iinf[i].name : hr::format("[ITEM %d]", i); }
|
||||
EX string dnameof(eMonster m) { return m >= 0 && m < motypes ? minf[m].name : hr::format("[MONSTER %d]", m); }
|
||||
EX string dnameof(eLand l) { return l >= 0 && l < landtypes ? linf[l].name : hr::format("[LAND %d]", l); }
|
||||
EX string dnameof(eWall w) { return w >= 0 && w < walltypes ? winf[w].name : hr::format("[WALL %d]", w); }
|
||||
EX string dnameof(eItem i) { return i >= 0 && i < ittypes ? iinf[i].name : hr::format("[ITEM %d]", i); }
|
||||
|
||||
#if HDR
|
||||
#define NUMLAN 9
|
||||
|
Reference in New Issue
Block a user