summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hscript/script.cc6
-rw-r--r--hscript/script.hh8
2 files changed, 6 insertions, 8 deletions
diff --git a/hscript/script.cc b/hscript/script.cc
index 7d1d4e2..70381d7 100644
--- a/hscript/script.cc
+++ b/hscript/script.cc
@@ -178,8 +178,7 @@ Script::~Script() {
delete internal;
}
-const Script *Script::load(const std::string &path,
- const ScriptOptions &opts) {
+Script *Script::load(const std::string &path, const ScriptOptions &opts) {
std::ifstream file(path);
if(!file) {
output_error(path, "Cannot open installfile", "");
@@ -190,8 +189,7 @@ const Script *Script::load(const std::string &path,
}
-const Script *Script::load(std::istream &sstream,
- const ScriptOptions &opts) {
+Script *Script::load(std::istream &sstream, const ScriptOptions &opts) {
#define PARSER_ERROR(err_str) \
errors++;\
output_error("installfile:" + std::to_string(lineno),\
diff --git a/hscript/script.hh b/hscript/script.hh
index e664f58..31e486d 100644
--- a/hscript/script.hh
+++ b/hscript/script.hh
@@ -64,15 +64,15 @@ 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(const std::string &path,
- const ScriptOptions &options = 0);
+ static 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,
- const ScriptOptions &options = 0);
+ static Script *load(std::istream &stream,
+ const ScriptOptions &options = 0);
/*! Determines if the HorizonScript is valid. */
bool validate() const;