Replace QStack with std::stack
This commit is contained in:
		
							parent
							
								
									922a16a013
								
							
						
					
					
						commit
						99866fb84c
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -23,7 +23,8 @@
 | 
			
		|||
#define GLSTATE_H
 | 
			
		||||
 | 
			
		||||
#include "etc.h"
 | 
			
		||||
#include <QStack>
 | 
			
		||||
 | 
			
		||||
#include <stack>
 | 
			
		||||
 | 
			
		||||
template<typename T>
 | 
			
		||||
struct GLProperty
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +36,7 @@ struct GLProperty
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	void push() { stack.push(current); }
 | 
			
		||||
	void pop()  { set(stack.pop()); }
 | 
			
		||||
	void pop()  { set(stack.top()); stack.pop(); }
 | 
			
		||||
	T &get()    { return current; }
 | 
			
		||||
	void set(const T &value)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -55,7 +56,7 @@ private:
 | 
			
		|||
	virtual void apply(const T &value) = 0;
 | 
			
		||||
 | 
			
		||||
	T current;
 | 
			
		||||
	QStack<T> stack;
 | 
			
		||||
	std::stack<T> stack;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Not needed
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -89,7 +89,7 @@ struct ColorQuadArray
 | 
			
		|||
		shState->ensureQuadIBO(quadCount);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	void draw(uint offset, uint count)
 | 
			
		||||
	void draw(size_t offset, size_t count)
 | 
			
		||||
	{
 | 
			
		||||
		VAO::bind(vao);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue