1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-11 07:39:43 +00:00

Fix some minor std::function-related bugs.

Lambdas to be stored in `function<void()>` should not return `bool`.

Two uses of `std::function` could be just `function`, like everywhere
else in the codebase.
This commit is contained in:
Arthur O'Dwyer
2019-01-05 20:40:45 -05:00
committed by Zeno Rogue
parent 26fe57ef92
commit a478bb1485
4 changed files with 6 additions and 9 deletions

View File

@@ -1870,9 +1870,9 @@ int taildist(cell *c) {
}
int last_wormsegment = -1;
vector<vector< std::function<void()> > > wormsegments;
vector<vector< function<void()> > > wormsegments;
void add_segment(int d, const std::function<void()>& s) {
void add_segment(int d, const function<void()>& s) {
if(isize(wormsegments) <= d) wormsegments.resize(d+1);
last_wormsegment = max(last_wormsegment, d);
wormsegments[d].push_back(s);
@@ -5778,7 +5778,7 @@ void drawscreen() {
mouseovers = " ";
cmode = 0;
keyhandler = [] (int sym, int uni) { return false; };
keyhandler = [] (int sym, int uni) {};
#if CAP_SDL
joyhandler = [] (SDL_Event& ev) { return false; };
#endif