diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-07 17:48:11 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-07 17:48:11 -0500 |
commit | c335af83e021311635256435a1321462b8f5be51 (patch) | |
tree | 687567b97cbd1fbaefe4de0ce2cf94e94b0340a3 | |
parent | 94fa461e0fe0c8004ee062c4d198dcae0bd29d68 (diff) | |
download | horizon-c335af83e021311635256435a1321462b8f5be51.tar.gz horizon-c335af83e021311635256435a1321462b8f5be51.tar.bz2 horizon-c335af83e021311635256435a1321462b8f5be51.tar.xz horizon-c335af83e021311635256435a1321462b8f5be51.zip |
hscript: constness fixes
-rw-r--r-- | hscript/script.cc | 4 | ||||
-rw-r--r-- | hscript/script.hh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hscript/script.cc b/hscript/script.cc index 01c920d..3196d9e 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -42,7 +42,7 @@ Script::Script() { internal = new ScriptPrivate; } -const Script *Script::load(std::string path, ScriptOptions opts) { +const Script *Script::load(const std::string path, const ScriptOptions opts) { std::ifstream file(path); if(!file) { output_error(path, "Cannot open installfile", "", @@ -73,7 +73,7 @@ bool is_key(std::string key) { output_warning("installfile:" + std::to_string(lineno),\ warn_str, "", (opts.test(Pretty))); -const Script *Script::load(std::istream &sstream, ScriptOptions opts) { +const Script *Script::load(std::istream &sstream, const ScriptOptions opts) { Script *the_script = new Script; int lineno = 0; diff --git a/hscript/script.hh b/hscript/script.hh index 5b8af95..65637c2 100644 --- a/hscript/script.hh +++ b/hscript/script.hh @@ -52,13 +52,13 @@ public: * @param options Options to use for parsing, validation, and execution. * @return true if the Script could be loaded; false otherwise. */ - static const Script *load(std::string path, ScriptOptions options = 0); + static const Script *load(const std::string path, const ScriptOptions options = 0); /*! Load a HorizonScript from the specified stream. * @param stream The stream to load from. * @param options Options to use for parsing, validation, and execution. * @return true if the Script could be loaded; false otherwise. */ - static const Script *load(std::istream &stream, ScriptOptions options = 0); + static const Script *load(std::istream &stream, const ScriptOptions options = 0); /*! Determines if the HorizonScript is valid. */ bool validate() const; |