diff options
| author | HampusM <hampus@hampusmat.com> | 2022-04-24 17:13:52 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 | 
| commit | db6edcd473a684420e9a7611b24462df21165c1b (patch) | |
| tree | 9646bdb4f5f6e339a0a01873b44e0b185476ce56 /src/engine/engine.cpp | |
| parent | b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (diff) | |
style: improve function and brace styling
Diffstat (limited to 'src/engine/engine.cpp')
| -rw-r--r-- | src/engine/engine.cpp | 20 | 
1 files changed, 13 insertions, 7 deletions
| diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index a05fed9..3bf8503 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -5,10 +5,13 @@  #include <thread>  #include <utility> -CLIGameEngine::CLIGameEngine(IGameFactory game_factory, ISceneFactory scene_factory, -							 std::shared_ptr<IInputHandler> input_handler, -							 std::shared_ptr<ICursorController> cursor_controller, -							 std::shared_ptr<IWindow> window) noexcept +CLIGameEngine::CLIGameEngine( +	IGameFactory game_factory, +	ISceneFactory scene_factory, +	std::shared_ptr<IInputHandler> input_handler, +	std::shared_ptr<ICursorController> cursor_controller, +	std::shared_ptr<IWindow> window +) noexcept  	: _game_factory(std::move(game_factory)),  	  _scene_factory(std::move(scene_factory)),  	  _input_handler(std::move(input_handler)), @@ -35,7 +38,8 @@ void CLIGameEngine::start() noexcept  			_input_handler->leave_raw_mode();  			game->on_exit(); -		})); +		} +	));  	_configure_input(game->get_input_config()); @@ -43,7 +47,8 @@ void CLIGameEngine::start() noexcept  		[this]()  		{  			_input_handler->listen(); -		})); +		} +	));  	while (true)  	{ @@ -52,7 +57,8 @@ void CLIGameEngine::start() noexcept  }  void CLIGameEngine::_configure_input( -	const std::unordered_map<char, std::shared_ptr<ICommand>> &input_config) noexcept +	const std::unordered_map<char, std::shared_ptr<ICommand>> &input_config +) noexcept  {  	for (const auto &config_pair : input_config)  	{ | 
