Skip to content

Commit f8473e9

Browse files
committed
Fix PoolArray search
1 parent 3ce43a8 commit f8473e9

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

examples/wasm-test/project.godot

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ _global_script_class_icons={
5959
config/name="WasmTest"
6060
run/main_scene="res://Main.tscn"
6161

62-
[debug]
63-
64-
gdscript/warnings/return_value_discarded=false
65-
6662
[display]
6763

6864
window/size/width=512

src/defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Useful for minimizing changes to implementation files between targets e.g. GDExt
5050
#define FAIL_IF(cond, message, ret) if (unlikely(cond)) FAIL(message, ret)
5151
#define INSTANTIATE_REF(ref) ref.instance()
5252
#define BYTE_ARRAY_POINTER(array) array.read().ptr()
53-
#define PACKED_ARRAY_HAS(array, value) array.read().ptr()->find(value) != -1
53+
#define PACKED_ARRAY_HAS(array, value) ({ bool f = false; for (int i = 0; i < array.size(); i++) { if (array[i] == value) { f = true; break; } } f; })
5454
#define CMDLINE_ARGS PoolStringArray() // User CLI args unsupported in Godot 3
5555
#define TIME_REALTIME OS::get_singleton()->get_system_time_msecs() * 1000000
5656
#define TIME_MONOTONIC OS::get_singleton()->get_ticks_usec() * 1000

0 commit comments

Comments
 (0)