mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	added missing override
This commit is contained in:
		
							
								
								
									
										27
									
								
								config.cpp
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								config.cpp
									
									
									
									
									
								
							| @@ -109,8 +109,8 @@ template<class T> struct enum_setting : list_setting { | |||||||
|   int get_value() override { return (int) *value; } |   int get_value() override { return (int) *value; } | ||||||
|   void set_value(int i) override { *value = (T) i; } |   void set_value(int i) override { *value = (T) i; } | ||||||
|   virtual bool affects(void* v) override { return v == value; } |   virtual bool affects(void* v) override { return v == value; } | ||||||
|   virtual void add_as_saver(); |   virtual void add_as_saver() override; | ||||||
|   virtual cld get_cld() { return get_value(); } |   virtual cld get_cld() override { return get_value(); } | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| struct float_setting : public setting { | struct float_setting : public setting { | ||||||
| @@ -130,12 +130,12 @@ struct float_setting : public setting { | |||||||
|     } |     } | ||||||
|   function<void(float_setting*)> modify_me; |   function<void(float_setting*)> modify_me; | ||||||
|   float_setting *modif(const function<void(float_setting*)>& r) { modify_me = r; return this; } |   float_setting *modif(const function<void(float_setting*)>& r) { modify_me = r; return this; } | ||||||
|   void add_as_saver(); |   void add_as_saver() override; | ||||||
|   virtual bool affects(void *v) override { return v == value; } |   virtual bool affects(void *v) override { return v == value; } | ||||||
|   virtual void show_edit_option(char key) override; |   virtual void show_edit_option(char key) override; | ||||||
|   virtual cld get_cld() { return *value; } |   virtual cld get_cld() override { return *value; } | ||||||
|  |  | ||||||
|   virtual void load_from(const string& s); |   virtual void load_from(const string& s) override; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| struct int_setting : public setting { | struct int_setting : public setting { | ||||||
| @@ -143,12 +143,12 @@ struct int_setting : public setting { | |||||||
|   int dft; |   int dft; | ||||||
|   int min_value, max_value; |   int min_value, max_value; | ||||||
|   ld step; |   ld step; | ||||||
|   void add_as_saver(); |   void add_as_saver() override; | ||||||
|   function<void(int_setting*)> modify_me; |   function<void(int_setting*)> modify_me; | ||||||
|   int_setting *modif(const function<void(int_setting*)>& r) { modify_me = r; return this; } |   int_setting *modif(const function<void(int_setting*)>& r) { modify_me = r; return this; } | ||||||
|   virtual bool affects(void *v) override { return v == value; } |   virtual bool affects(void *v) override { return v == value; } | ||||||
|   virtual void show_edit_option(char key) override; |   virtual void show_edit_option(char key) override; | ||||||
|   virtual cld get_cld() { return *value; } |   virtual cld get_cld() override { return *value; } | ||||||
|   int_setting *editable(int min_value, int max_value, ld step, string menu_item_name, string help_text, char key) { |   int_setting *editable(int min_value, int max_value, ld step, string menu_item_name, string help_text, char key) { | ||||||
|     this->min_value = min_value; |     this->min_value = min_value; | ||||||
|     this->max_value = max_value; |     this->max_value = max_value; | ||||||
| @@ -159,16 +159,15 @@ struct int_setting : public setting { | |||||||
|     return this; |     return this; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   virtual void load_from(const string& s) { |   virtual void load_from(const string& s) override { | ||||||
|     *value = parseint(s); |     *value = parseint(s); | ||||||
|     println(hlog, "set ", parameter_name, " to ", *value); |  | ||||||
|     } |     } | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| struct bool_setting : public setting { | struct bool_setting : public setting { | ||||||
|   bool *value; |   bool *value; | ||||||
|   bool dft; |   bool dft; | ||||||
|   void add_as_saver(); |   void add_as_saver() override; | ||||||
|   reaction_t switcher; |   reaction_t switcher; | ||||||
|   bool_setting* editable(string cap, char key ) { |   bool_setting* editable(string cap, char key ) { | ||||||
|     is_editable = true; |     is_editable = true; | ||||||
| @@ -176,16 +175,16 @@ struct bool_setting : public setting { | |||||||
|     }  |     }  | ||||||
|   virtual bool affects(void *v) override { return v == value; } |   virtual bool affects(void *v) override { return v == value; } | ||||||
|   virtual void show_edit_option(char key) override; |   virtual void show_edit_option(char key) override; | ||||||
|   virtual cld get_cld() { return *value ? 1 : 0; } |   virtual cld get_cld() override { return *value ? 1 : 0; } | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| struct custom_setting : public setting {   | struct custom_setting : public setting {   | ||||||
|   function<void(char)> custom_viewer; |   function<void(char)> custom_viewer; | ||||||
|   function<cld()> custom_value; |   function<cld()> custom_value; | ||||||
|   function<bool(void*)> custom_affect; |   function<bool(void*)> custom_affect; | ||||||
|   virtual void show_edit_option(char key) { custom_viewer(key); } |   virtual void show_edit_option(char key) override { custom_viewer(key); } | ||||||
|   virtual cld get_cld() { return custom_value(); } |   virtual cld get_cld() override { return custom_value(); } | ||||||
|   virtual bool affects(void *v) { return custom_affect(v); } |   virtual bool affects(void *v) override { return custom_affect(v); } | ||||||
|   }; |   }; | ||||||
|    |    | ||||||
| #if CAP_CONFIG | #if CAP_CONFIG | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue