mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	static with lambdas apparently does not work in old compilers
This commit is contained in:
		| @@ -306,10 +306,13 @@ vector<pair<cellwalker,int> > drawbugs; | |||||||
|  |  | ||||||
| bool debugmode = false; | bool debugmode = false; | ||||||
|  |  | ||||||
|  | // static apparently does not work in old compilers | ||||||
|  | int bitfield_v; | ||||||
|  |  | ||||||
| template<class T> void bitfield_editor(int val, const T& setter, string help = "") { | template<class T> void bitfield_editor(int val, const T& setter, string help = "") { | ||||||
|   static int v = val; |   bitfield_v = val; | ||||||
|   dialog::editNumber(v, 0, 100, 1, v, help, ""); |   dialog::editNumber(bitfield_v, 0, 100, 1, bitfield_v, help, ""); | ||||||
|   dialog::reaction = [&setter] () { setter(v); }; |   dialog::reaction = [&setter] () { setter(bitfield_v); }; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| struct debugScreen { | struct debugScreen { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue