From b4bca7ea3b9f072ee543f3e465e02fccb533b0fb Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 24 Dec 2014 05:37:26 +0100 Subject: [PATCH] GLState: Constify --- src/glstate.cpp | 2 +- src/glstate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)