GLProperty: Assert proper stack usage

This commit is contained in:
Jonas Kulla 2014-07-20 13:15:03 +02:00
parent c44f4d7d28
commit 7ce747d34d
1 changed files with 6 additions and 0 deletions

View File

@ -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;