Skip to content

Commit fec599a

Browse files
committed
Fix broken compilation for 3.2-stable after API change
1 parent 5b325d1 commit fec599a

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## 0.0.42 - 2020-02-11
11+
12+
### Fixed
13+
14+
* Fix broken compilation for 3.2-stable after API change
15+
1016
## 0.0.41 - 2020-01-02
1117

1218
### Changed

lua_script.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ StringName LuaScript::get_instance_base_type() const { // TODO
7474
ScriptInstance *LuaScript::instance_create(Object *p_this) { // TODO
7575
print_debug("LuaScript::instance_create( p_this = " + p_this->get_class_name() + " )");
7676

77-
ERR_FAIL_COND_V(!this->valid, nullptr)
77+
ERR_FAIL_COND_V(!this->valid, nullptr);
7878

7979
if (!tool && !ScriptServer::is_scripting_enabled()) {
8080
#ifdef TOOLS_ENABLED
@@ -148,7 +148,7 @@ Error LuaScript::reload(bool p_keep_state) { // TODO
148148
{
149149
auto guard = LuaScriptLanguage::acquire();
150150
bool has_instances = instances.size();
151-
ERR_FAIL_COND_V(!p_keep_state && has_instances, ERR_ALREADY_IN_USE)
151+
ERR_FAIL_COND_V(!p_keep_state && has_instances, ERR_ALREADY_IN_USE);
152152
}
153153

154154
this->valid = false;
@@ -263,7 +263,7 @@ Error LuaScript::load_source_code(const String &p_path) {
263263

264264
FileAccess *file = FileAccess::open(p_path, FileAccess::READ, &error);
265265
if (error) {
266-
ERR_FAIL_COND_V(error, error)
266+
ERR_FAIL_COND_V(error, error);
267267
}
268268

269269
PoolVector<uint8_t> buffer;
@@ -278,14 +278,14 @@ Error LuaScript::load_source_code(const String &p_path) {
278278
file->close();
279279
memdelete(file);
280280

281-
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN)
281+
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
282282

283283
w[len] = 0;
284284

285285
String source;
286286

287287
if (source.parse_utf8((const char *)w.ptr())) {
288-
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (utf-8), so it was not loaded. Please ensure that scripts are saved in valid utf-8 unicode.")
288+
ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (utf-8), so it was not loaded. Please ensure that scripts are saved in valid utf-8 unicode.");
289289
}
290290

291291
this->set_source_code(source);

lua_script_instance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ bool LuaScriptInstance::has_method(const StringName &p_method) const {
8181
Variant LuaScriptInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
8282
print_debug("LuaScriptInstance::call( p_method = " + p_method + " )");
8383

84-
if (!script.is_valid())
85-
ERR_FAIL_V(Variant())
84+
if (!script.is_valid()) {
85+
ERR_FAIL_V(Variant());
86+
}
8687

8788
// FIXME call this|base::method
8889

lua_script_language.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LuaScriptLanguage *LuaScriptLanguage::singleton = nullptr;
3232
LuaScriptLanguage::LuaScriptLanguage() {
3333
print_debug("LuaScriptLanguage::constructor");
3434

35-
ERR_FAIL_COND(singleton)
35+
ERR_FAIL_COND(singleton);
3636
this->singleton = this;
3737

3838
this->mutex = Mutex::create();

0 commit comments

Comments
 (0)