diff --git a/src/glstate.cpp b/src/glstate.cpp index 8c3a2a4..73aec31 100644 --- a/src/glstate.cpp +++ b/src/glstate.cpp @@ -43,7 +43,7 @@ void GLScissorBox::apply(const IntRect &value) void GLScissorBox::setIntersect(const IntRect &value) { - IntRect ¤t = get(); + const IntRect ¤t = get(); SDL_Rect r1 = { current.x, current.y, current.w, current.h }; SDL_Rect r2 = { value.x, value.y, value.w, value.h }; diff --git a/src/glstate.h b/src/glstate.h index 8eb7fc0..63b0bcb 100644 --- a/src/glstate.h +++ b/src/glstate.h @@ -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)