GLState: Constify

This commit is contained in:
Jonas Kulla 2014-12-24 05:37:26 +01:00
parent 725af97e7b
commit b4bca7ea3b
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ void GLScissorBox::apply(const IntRect &value)
void GLScissorBox::setIntersect(const IntRect &value)
{
IntRect &current = get();
const IntRect &current = get();
SDL_Rect r1 = { current.x, current.y, current.w, current.h };
SDL_Rect r2 = { value.x, value.y, value.w, value.h };

View File

@ -43,7 +43,7 @@ struct GLProperty
void push() { stack.push(current); }
void pop() { set(stack.top()); stack.pop(); }
T &get() { return current; }
const T &get() { return current; }
void set(const T &value)
{
if (value == current)