diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-26 17:05:18 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-26 17:18:21 +0200 |
commit | 43e99491a76bb85faf60c004e84b6c2b14cf41e7 (patch) | |
tree | 4aba689b76138118b4da043425fb3e8576db418c /src/scripting/script.cpp | |
parent | e726c34606f85347e70a0deb6b180db03b6d0c25 (diff) | |
download | manaserv-43e99491a76bb85faf60c004e84b6c2b14cf41e7.tar.gz manaserv-43e99491a76bb85faf60c004e84b6c2b14cf41e7.tar.bz2 manaserv-43e99491a76bb85faf60c004e84b6c2b14cf41e7.tar.xz manaserv-43e99491a76bb85faf60c004e84b6c2b14cf41e7.zip |
Standardize on the position of the const keyword
Same as for the client.
Diffstat (limited to 'src/scripting/script.cpp')
-rw-r--r-- | src/scripting/script.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scripting/script.cpp b/src/scripting/script.cpp index f334eb19..e343b558 100644 --- a/src/scripting/script.cpp +++ b/src/scripting/script.cpp @@ -36,7 +36,7 @@ Script::Script(): mEventListener(&scriptEventDispatch) {} -void Script::registerEngine(std::string const &name, Factory f) +void Script::registerEngine(const std::string &name, Factory f) { if (!engines) { @@ -49,7 +49,7 @@ void Script::registerEngine(std::string const &name, Factory f) (*engines)[name] = f; } -Script *Script::create(std::string const &engine) +Script *Script::create(const std::string &engine) { if (engines) { @@ -69,7 +69,7 @@ void Script::update() execute(); } -bool Script::loadFile(std::string const &name) +bool Script::loadFile(const std::string &name) { int size; char *buffer = ResourceManager::loadFile(name, size); @@ -84,7 +84,8 @@ bool Script::loadFile(std::string const &name) } } -void Script::loadNPC(std::string const &name, int id, int x, int y, char const *prog) +void Script::loadNPC(const std::string &name, int id, int x, int y, + const char *prog) { load(prog); prepare("create_npc_delayed"); |