From 72bde6dcf91529d1ae34c4b4af440210f527f350 Mon Sep 17 00:00:00 2001 From: Chukobyte Date: Fri, 8 Dec 2023 22:04:43 -0500 Subject: [PATCH] Removing unused 'type' for subject notify payloads. --- seika/utils/observer.h | 1 - test/main.c | 4 ++-- vcpkg.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/seika/utils/observer.h b/seika/utils/observer.h index c16fac4..2fab93c 100644 --- a/seika/utils/observer.h +++ b/seika/utils/observer.h @@ -7,7 +7,6 @@ typedef struct SESubjectNotifyPayload { void* data; // Primary data, be sure to cast properly - int type; // Secondary data, can be used to filter things, an easier value to access, etc... } SESubjectNotifyPayload; typedef void (*SEObserverOnNotify)(SESubjectNotifyPayload*); diff --git a/test/main.c b/test/main.c index ddec3fe..5d0fe9f 100644 --- a/test/main.c +++ b/test/main.c @@ -284,7 +284,7 @@ void observer_func1(SESubjectNotifyPayload* payload) { void observer_func2(SESubjectNotifyPayload* payload) { const int dataValue = *(int*) payload->data; - if (dataValue == 3 && payload->type == 127) { + if (dataValue == 3) { hasObserved = true; } } @@ -307,7 +307,7 @@ void seika_observer_test(void) { se_event_register_observer(event, observer); int dataValue = 3; se_event_notify_observers(event, &(SESubjectNotifyPayload) { - .data = &dataValue, .type = 127 + .data = &dataValue }); TEST_ASSERT(hasObserved); diff --git a/vcpkg.json b/vcpkg.json index 8dbee4a..eced553 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "seika", - "version": "0.0.3", + "version": "0.0.4", "dependencies": [ { "name": "sdl2",