constness fixes

actorid
Marc Zinnschlag 15 years ago
parent 0efe4742a6
commit 6b3ff8a516

@ -101,7 +101,7 @@ namespace SAInterpreter
void Context::setGlobalFloat (const std::string& name, float value) {} void Context::setGlobalFloat (const std::string& name, float value) {}
bool Context::isScriptRunning (const std::string& name) bool Context::isScriptRunning (const std::string& name) const
{ {
return false; return false;
} }
@ -110,7 +110,7 @@ namespace SAInterpreter
void Context::stopScript (const std::string& name) {} void Context::stopScript (const std::string& name) {}
float Context::getDistance (const std::string& name) float Context::getDistance (const std::string& name) const
{ {
return 0; return 0;
} }

@ -52,13 +52,13 @@ namespace SAInterpreter
virtual void setGlobalFloat (const std::string& name, float value); virtual void setGlobalFloat (const std::string& name, float value);
virtual bool isScriptRunning (const std::string& name); virtual bool isScriptRunning (const std::string& name) const;
virtual void startScript (const std::string& name); virtual void startScript (const std::string& name);
virtual void stopScript (const std::string& name); virtual void stopScript (const std::string& name);
virtual float getDistance (const std::string& name); virtual float getDistance (const std::string& name) const;
virtual float getSecondsPassed() const; virtual float getSecondsPassed() const;

@ -125,7 +125,7 @@ namespace MWScript
*reinterpret_cast<Interpreter::Type_Data *> (&value); *reinterpret_cast<Interpreter::Type_Data *> (&value);
} }
bool InterpreterContext::isScriptRunning (const std::string& name) bool InterpreterContext::isScriptRunning (const std::string& name) const
{ {
return mEnvironment.mGlobalScripts->isRunning (name); return mEnvironment.mGlobalScripts->isRunning (name);
} }
@ -140,7 +140,7 @@ namespace MWScript
mEnvironment.mGlobalScripts->removeScript (name); mEnvironment.mGlobalScripts->removeScript (name);
} }
float InterpreterContext::getDistance (const std::string& name) float InterpreterContext::getDistance (const std::string& name) const
{ {
if (mReference.isEmpty()) if (mReference.isEmpty())
throw std::runtime_error ("no implicit reference"); throw std::runtime_error ("no implicit reference");

@ -61,13 +61,13 @@ namespace MWScript
virtual void setGlobalFloat (const std::string& name, float value); virtual void setGlobalFloat (const std::string& name, float value);
virtual bool isScriptRunning (const std::string& name); virtual bool isScriptRunning (const std::string& name) const;
virtual void startScript (const std::string& name); virtual void startScript (const std::string& name);
virtual void stopScript (const std::string& name); virtual void stopScript (const std::string& name);
virtual float getDistance (const std::string& name); virtual float getDistance (const std::string& name) const;
virtual bool hasBeenActivated() const; virtual bool hasBeenActivated() const;

@ -47,13 +47,13 @@ namespace Interpreter
virtual void setGlobalFloat (const std::string& name, float value) = 0; virtual void setGlobalFloat (const std::string& name, float value) = 0;
virtual bool isScriptRunning (const std::string& name) = 0; virtual bool isScriptRunning (const std::string& name) const = 0;
virtual void startScript (const std::string& name) = 0; virtual void startScript (const std::string& name) = 0;
virtual void stopScript (const std::string& name) = 0; virtual void stopScript (const std::string& name) = 0;
virtual float getDistance (const std::string& name) = 0; virtual float getDistance (const std::string& name) const = 0;
virtual float getSecondsPassed() const = 0; virtual float getSecondsPassed() const = 0;
}; };

Loading…
Cancel
Save