1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Arthur O'Dwyer
28880f2985 Consistently apply override (and not virtual) to overriding virtuals
Three functions were missing `override`, triggering `-Wsuggest-override` on Clang.
Many functions had redundant `virtual ... override`.
2023-08-21 10:23:48 -07:00
Zeno Rogue
e3357c9b26 added missing override in hyper_function.h 2023-08-16 10:27:27 +02:00
Zeno Rogue
4668321e4e dialog:: more fixes 2023-08-09 14:22:32 +02:00
Arthur O'Dwyer
090e084dd4 Add explicit and override consistently everywhere else. NFCI. 2021-07-11 18:03:08 -04:00
Zeno Rogue
8f8fb8a217 replaced hooks_startmenu and hooks_mainmenu with a general hooks_display_dialog 2019-09-12 22:50:16 +02:00
Arthur O'Dwyer
ac37e5c000 Get hyper_function.h compiling on GCC 4.6.
We must avoid the following features:
- the `using` syntax for typedefs
- alias templates (so, rename `hyper_function` to `function`)
- the `override` keyword
- defaulted virtual destructors
2019-02-10 15:54:58 -05:00
Arthur O'Dwyer
9471ac4ff5 Rearrange some macros. No functional change intended. 2019-02-08 18:18:56 -05:00
Arthur O'Dwyer
87240cf990 Replace std::function with hyper_function for a 37% speedup in compile time.
Before:

    time c++ -O2 -DMAC -I/usr/local/include -std=c++11 -march=native
             -W -Wall -Wextra -Werror -pedantic -Wno-format-pedantic
             -Wno-missing-field-initializers -Wno-unused-parameter
             -DCAP_GLEW=0 -DCAP_PNG=0    -c hyper.cpp -o hyper.o

    real 2m22.508s
    user 2m20.625s
    sys  0m1.648s

After:

    time c++ -O2 -DMAC -I/usr/local/include -std=c++11 -march=native
             -W -Wall -Wextra -Werror -pedantic -Wno-format-pedantic
             -Wno-missing-field-initializers -Wno-unused-parameter
             -DCAP_GLEW=0 -DCAP_PNG=0    -c hyper.cpp -o hyper.o

    real 1m30.515s
    user 1m29.793s
    sys  0m0.689s

Comparing object file size:

    -rw-r--r--  1 ajo  staff  8215036 Jan  5 20:46 old-hyper.o
    -rw-r--r--  1 ajo  staff  7538072 Jan  5 20:47 new-hyper.o

Comparing number of symbols:

    nm old-hyper.o | wc -l  => 12590
    nm new-hyper.o | wc -l  =>  9742

No appreciable difference in link time; the linker takes less than
half a second in either case.
2019-02-06 18:48:53 +01:00