diff options
| author | Loic Blot <loic.blot@unix-experience.fr> | 2018-01-13 10:54:18 +0100 |
|---|---|---|
| committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-01-20 16:38:38 +0100 |
| commit | 99c9e7a9864a8da5aaf97e615d2bdefa1295497a (patch) | |
| tree | ce9fbbc2acb2a69f8811ce475d469673fc2953e4 /src/gui/profilergraph.h | |
| parent | f5a006dce7896d9241b7d21df77825c1c5decc88 (diff) | |
| download | minetest-99c9e7a9864a8da5aaf97e615d2bdefa1295497a.tar.xz | |
Game refactor [4/X]: keycache is now owned by InputHandler
* Make InputHandler own the key cache
* Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp
* Move RandomInputHandler::step definition into cpp file
Diffstat (limited to 'src/gui/profilergraph.h')
| -rw-r--r-- | src/gui/profilergraph.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/profilergraph.h b/src/gui/profilergraph.h index 9f2c87853..6354ac9ef 100644 --- a/src/gui/profilergraph.h +++ b/src/gui/profilergraph.h @@ -30,22 +30,25 @@ with this program; if not, write to the Free Software Foundation, Inc., class ProfilerGraph { private: - struct Piece { + struct Piece + { Piece(Profiler::GraphValues v) : values(std::move(v)) {} Profiler::GraphValues values; }; - struct Meta { + struct Meta + { float min; float max; video::SColor color; Meta(float initial = 0, - video::SColor color = video::SColor(255, 255, 255, 255)): - min(initial), - max(initial), - color(color) - {} + video::SColor color = video::SColor(255, 255, 255, 255)) : + min(initial), + max(initial), color(color) + { + } }; std::deque<Piece> m_log; + public: u32 m_log_max_size = 200; @@ -54,5 +57,5 @@ public: void put(const Profiler::GraphValues &values); void draw(s32 x_left, s32 y_bottom, video::IVideoDriver *driver, - gui::IGUIFont *font) const; + gui::IGUIFont *font) const; }; |
