mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #4304 from B3n30/std_optional
Replace boost::optional with std::optional where possible
This commit is contained in:
		
						commit
						9adc407112
					
				
					 30 changed files with 115 additions and 109 deletions
				
			
		|  | @ -317,12 +317,12 @@ void ConfigureInput::setPollingResult(const Common::ParamPackage& params, bool a | |||
|         poller->Stop(); | ||||
|     } | ||||
| 
 | ||||
|     if (!abort) { | ||||
|     if (!abort && input_setter) { | ||||
|         (*input_setter)(params); | ||||
|     } | ||||
| 
 | ||||
|     updateButtonLabels(); | ||||
|     input_setter = boost::none; | ||||
|     input_setter.reset(); | ||||
| } | ||||
| 
 | ||||
| void ConfigureInput::keyPressEvent(QKeyEvent* event) { | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // Copyright 2016 Citra Emulator Project
 | ||||
| // Copyright 2016 Citra Emulator Project
 | ||||
| // Licensed under GPLv2 or any later version
 | ||||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
|  | @ -7,11 +7,11 @@ | |||
| #include <array> | ||||
| #include <functional> | ||||
| #include <memory> | ||||
| #include <optional> | ||||
| #include <string> | ||||
| #include <unordered_map> | ||||
| #include <QKeyEvent> | ||||
| #include <QWidget> | ||||
| #include <boost/optional.hpp> | ||||
| #include "common/param_package.h" | ||||
| #include "core/settings.h" | ||||
| #include "input_common/main.h" | ||||
|  | @ -42,7 +42,7 @@ private: | |||
|     std::unique_ptr<QTimer> poll_timer; | ||||
| 
 | ||||
|     /// This will be the the setting function when an input is awaiting configuration.
 | ||||
|     boost::optional<std::function<void(const Common::ParamPackage&)>> input_setter; | ||||
|     std::optional<std::function<void(const Common::ParamPackage&)>> input_setter; | ||||
| 
 | ||||
|     std::array<Common::ParamPackage, Settings::NativeButton::NumButtons> buttons_param; | ||||
|     std::array<Common::ParamPackage, Settings::NativeAnalog::NumAnalogs> analogs_param; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue