SharedState: Constify most getter methods

This commit is contained in:
Jonas Kulla 2014-08-12 20:33:40 +02:00
parent 18022bf809
commit 194f70c48c
2 changed files with 19 additions and 19 deletions

View File

@ -208,7 +208,7 @@ void SharedState::setScreen(Scene &screen)
} }
#define GSATT(type, lower) \ #define GSATT(type, lower) \
type SharedState :: lower() \ type SharedState :: lower() const \
{ \ { \
return p->lower; \ return p->lower; \
} }
@ -330,7 +330,7 @@ void SharedState::checkShutdown()
scriptBinding->terminate(); scriptBinding->terminate();
} }
Font &SharedState::defaultFont() Font &SharedState::defaultFont() const
{ {
return *p->defaultFont; return *p->defaultFont;
} }

View File

@ -55,35 +55,35 @@ struct SharedMidiState;
struct SharedState struct SharedState
{ {
void *bindingData(); void *bindingData() const;
void setBindingData(void *data); void setBindingData(void *data);
SDL_Window *sdlWindow(); SDL_Window *sdlWindow() const;
Scene *screen(); Scene *screen() const;
void setScreen(Scene &screen); void setScreen(Scene &screen);
FileSystem &fileSystem(); FileSystem &fileSystem() const;
EventThread &eThread(); EventThread &eThread() const;
RGSSThreadData &rtData(); RGSSThreadData &rtData() const;
Config &config(); Config &config() const;
Graphics &graphics(); Graphics &graphics() const;
Input &input(); Input &input() const;
Audio &audio(); Audio &audio() const;
GLState &_glState(); GLState &_glState() const;
ShaderSet &shaders(); ShaderSet &shaders() const;
TexPool &texPool(); TexPool &texPool() const;
SharedFontState &fontState(); SharedFontState &fontState() const;
Font &defaultFont(); Font &defaultFont() const;
#ifdef MIDI #ifdef MIDI
SharedMidiState &midiState(); SharedMidiState &midiState() const;
#endif #endif
sigc::signal<void> prepareDraw; sigc::signal<void> prepareDraw;
@ -101,7 +101,7 @@ struct SharedState
TEXFBO &gpTexFBO(int minW, int minH); TEXFBO &gpTexFBO(int minW, int minH);
Quad &gpQuad(); Quad &gpQuad() const;
/* Basically just a simple "TexPool" /* Basically just a simple "TexPool"
* replacement for Tilemap atlas use */ * replacement for Tilemap atlas use */