mirror of
				https://github.com/N64Recomp/N64ModernRuntime.git
				synced 2025-10-30 08:02:29 +00:00 
			
		
		
		
	Make mod config value getters const (#103)
This commit is contained in:
		
							parent
							
								
									bb6b3b1645
								
							
						
					
					
						commit
						234ed4a95e
					
				
					 2 changed files with 5 additions and 5 deletions
				
			
		|  | @ -350,8 +350,8 @@ namespace recomp { | |||
|             const std::vector<char> &get_mod_thumbnail(const std::string &mod_id) const; | ||||
|             void set_mod_config_value(size_t mod_index, const std::string &option_id, const ConfigValueVariant &value); | ||||
|             void set_mod_config_value(const std::string &mod_id, const std::string &option_id, const ConfigValueVariant &value); | ||||
|             ConfigValueVariant get_mod_config_value(size_t mod_index, const std::string &option_id); | ||||
|             ConfigValueVariant get_mod_config_value(const std::string &mod_id, const std::string &option_id); | ||||
|             ConfigValueVariant get_mod_config_value(size_t mod_index, const std::string &option_id) const; | ||||
|             ConfigValueVariant get_mod_config_value(const std::string &mod_id, const std::string &option_id) const; | ||||
|             void set_mods_config_path(const std::filesystem::path &path); | ||||
|             void set_mod_config_directory(const std::filesystem::path &path); | ||||
|             ModContentTypeId register_content_type(const ModContentType& type); | ||||
|  | @ -393,7 +393,7 @@ namespace recomp { | |||
|             moodycamel::BlockingConcurrentQueue<ModConfigQueueVariant> mod_configuration_thread_queue; | ||||
|             std::filesystem::path mods_config_path; | ||||
|             std::filesystem::path mod_config_directory; | ||||
|             std::mutex mod_config_storage_mutex; | ||||
|             mutable std::mutex mod_config_storage_mutex; | ||||
|             std::vector<size_t> loaded_code_mods; | ||||
|             // Code handle for vanilla code that was regenerated to add hooks.
 | ||||
|             std::unique_ptr<LiveRecompilerCodeHandle> regenerated_code_handle; | ||||
|  |  | |||
|  | @ -1406,7 +1406,7 @@ void recomp::mods::ModContext::set_mod_config_value(const std::string &mod_id, c | |||
|     set_mod_config_value(find_it->second, option_id, value); | ||||
| } | ||||
| 
 | ||||
| recomp::mods::ConfigValueVariant recomp::mods::ModContext::get_mod_config_value(size_t mod_index, const std::string &option_id) { | ||||
| recomp::mods::ConfigValueVariant recomp::mods::ModContext::get_mod_config_value(size_t mod_index, const std::string &option_id) const { | ||||
|     // Check that the mod exists.
 | ||||
|     if (mod_index >= opened_mods.size()) { | ||||
|         return std::monostate(); | ||||
|  | @ -1440,7 +1440,7 @@ recomp::mods::ConfigValueVariant recomp::mods::ModContext::get_mod_config_value( | |||
|     } | ||||
| } | ||||
| 
 | ||||
| recomp::mods::ConfigValueVariant recomp::mods::ModContext::get_mod_config_value(const std::string &mod_id, const std::string &option_id) { | ||||
| recomp::mods::ConfigValueVariant recomp::mods::ModContext::get_mod_config_value(const std::string &mod_id, const std::string &option_id) const { | ||||
|     // Check that the mod exists.
 | ||||
|     auto find_it = opened_mods_by_id.find(mod_id); | ||||
|     if (find_it == opened_mods_by_id.end()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Wiseguy
						Wiseguy