GLProperty: Assert proper stack usage
This commit is contained in:
		
							parent
							
								
									c44f4d7d28
								
							
						
					
					
						commit
						7ce747d34d
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -25,10 +25,16 @@
 | 
			
		|||
#include "etc.h"
 | 
			
		||||
 | 
			
		||||
#include <stack>
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
template<typename T>
 | 
			
		||||
struct GLProperty
 | 
			
		||||
{
 | 
			
		||||
	~GLProperty()
 | 
			
		||||
	{
 | 
			
		||||
		assert(stack.size() == 0);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	void init(const T &value)
 | 
			
		||||
	{
 | 
			
		||||
		current = value;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue