From b4ebd5f12ff28e4897ad5d636b1843000be38d41 Mon Sep 17 00:00:00 2001 From: paintdream Date: Thu, 9 May 2024 22:34:03 +0800 Subject: [PATCH] [DOC] Update date information. --- LICENSE | 2 +- src/iris_buffer.h | 2 +- src/iris_common.h | 2 +- src/iris_common.inl | 2 +- src/iris_coroutine.h | 4 ++-- src/iris_dispatcher.h | 7 +++---- src/iris_lua.h | 6 +++--- src/iris_system.h | 2 +- src/iris_tree.h | 2 +- test/iris_buffer_demo.cpp | 10 +++++----- test/iris_dispatcher_demo.cpp | 2 +- test/iris_engine_demo.cpp | 2 +- test/iris_system_demo.cpp | 10 +++++----- 13 files changed, 26 insertions(+), 27 deletions(-) diff --git a/LICENSE b/LICENSE index fe53e0f..484a6b8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/iris_buffer.h b/src/iris_buffer.h index 5befe8e..1116025 100644 --- a/src/iris_buffer.h +++ b/src/iris_buffer.h @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -copyright (c) 2014-2023 PaintDream +copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/iris_common.h b/src/iris_common.h index f479fa7..6821dde 100644 --- a/src/iris_common.h +++ b/src/iris_common.h @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/iris_common.inl b/src/iris_common.inl index bef8b10..962dbda 100644 --- a/src/iris_common.inl +++ b/src/iris_common.inl @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/iris_coroutine.h b/src/iris_coroutine.h index d347260..3882370 100644 --- a/src/iris_coroutine.h +++ b/src/iris_coroutine.h @@ -5,7 +5,7 @@ This software is a C++ 20 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1051,7 +1051,7 @@ namespace iris { } ~iris_listen_dispatch_t() noexcept { - assert(routine == nullptr); + IRIS_ASSERT(routine == nullptr); } template diff --git a/src/iris_dispatcher.h b/src/iris_dispatcher.h index baa51f1..8605052 100644 --- a/src/iris_dispatcher.h +++ b/src/iris_dispatcher.h @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -295,7 +295,7 @@ namespace iris { // execute remaining tasks on destruction while (!join()) {} - assert(parallel_task_head.load(std::memory_order_relaxed) == nullptr); + IRIS_ASSERT(parallel_task_head.load(std::memory_order_relaxed) == nullptr); } // get stack warp pointer @@ -706,7 +706,6 @@ namespace iris { async_worker_t& async_worker; // host async worker std::atomic thread_warp; // save the running thread warp address. std::atomic suspend_count; // current suspend count - std::atomic interrupting; // is interrupting by external request? std::atomic queueing; // is flush request sent to async_worker? 0 : not yet, 1 : yes, 2 : is to flush right away. std::atomic parallel_task_head; // linked-list for pending parallel tasks impl::storage_t storage; // task storage @@ -1176,7 +1175,7 @@ namespace iris { } void queue_task(task_t* task, size_t priority = 0) { - assert(task != nullptr && task->next == nullptr); + IRIS_ASSERT(task != nullptr && task->next == nullptr); if (!is_terminated()) { IRIS_ASSERT(!threads.empty()); priority = std::min(priority, std::max(internal_thread_count, (size_t)1) - 1u); diff --git a/src/iris_lua.h b/src/iris_lua.h index cbd2634..c3e8601 100644 --- a/src/iris_lua.h +++ b/src/iris_lua.h @@ -5,7 +5,7 @@ This software is a C++ 17 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -499,7 +499,7 @@ namespace iris { template refptr_t make_object_view(meta_t&& meta, type_t* object) { IRIS_PROFILE_SCOPE(__FUNCTION__); - assert(object != nullptr); + IRIS_ASSERT(object != nullptr); lua_State* L = state; stack_guard_t guard(L); @@ -913,7 +913,7 @@ namespace iris { static return_t method_functor_adapter(iris_lua_t lua, std::remove_reference_t&&... args) { lua_State* L = lua.get_state(); type_t* ptr = reinterpret_cast(lua_touserdata(L, lua_upvalueindex(1))); - assert(ptr != nullptr); + IRIS_ASSERT(ptr != nullptr); if constexpr (!std::is_void_v) { return (ptr->*method)(std::move(args)...); diff --git a/src/iris_system.h b/src/iris_system.h index b23a90a..9cd330b 100644 --- a/src/iris_system.h +++ b/src/iris_system.h @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/iris_tree.h b/src/iris_tree.h index dcb0bc2..c8daf46 100644 --- a/src/iris_tree.h +++ b/src/iris_tree.h @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project The MIT License (MIT) -Copyright (c) 2014-2023 PaintDream +Copyright (c) 2014-2024 PaintDream Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/test/iris_buffer_demo.cpp b/test/iris_buffer_demo.cpp index 1457b44..c66e372 100644 --- a/test/iris_buffer_demo.cpp +++ b/test/iris_buffer_demo.cpp @@ -13,11 +13,11 @@ int main(void) { iris_union_set_join(union_set, 7u, 5u); iris_union_set_join(union_set, 1u, 5u); - assert(iris_union_set_find(union_set, 1u) == iris_union_set_find(union_set, 7u)); - assert(iris_union_set_find(union_set, 4u) != iris_union_set_find(union_set, 6u)); - assert(iris_union_set_find(union_set, 2u) == iris_union_set_find(union_set, 8u)); - assert(iris_union_set_find(union_set, 5u) != iris_union_set_find(union_set, 9u)); - assert(iris_union_set_find(union_set, 0u) != iris_union_set_find(union_set, 3u)); + IRIS_ASSERT(iris_union_set_find(union_set, 1u) == iris_union_set_find(union_set, 7u)); + IRIS_ASSERT(iris_union_set_find(union_set, 4u) != iris_union_set_find(union_set, 6u)); + IRIS_ASSERT(iris_union_set_find(union_set, 2u) == iris_union_set_find(union_set, 8u)); + IRIS_ASSERT(iris_union_set_find(union_set, 5u) != iris_union_set_find(union_set, 9u)); + IRIS_ASSERT(iris_union_set_find(union_set, 0u) != iris_union_set_find(union_set, 3u)); iris_bytes_t bytes; iris_buffer_t buffer; diff --git a/test/iris_dispatcher_demo.cpp b/test/iris_dispatcher_demo.cpp index 1452c9d..c2bb3f0 100644 --- a/test/iris_dispatcher_demo.cpp +++ b/test/iris_dispatcher_demo.cpp @@ -633,6 +633,6 @@ void update_version() { } worker.join(); - assert(final_version == version_count); + IRIS_ASSERT(final_version == version_count); printf("Success of update %d/%d\n", success_count.load(std::memory_order_acquire), version_count); } diff --git a/test/iris_engine_demo.cpp b/test/iris_engine_demo.cpp index 405ac0d..0b559a0 100644 --- a/test/iris_engine_demo.cpp +++ b/test/iris_engine_demo.cpp @@ -47,7 +47,7 @@ struct engine_t { co_await sync_event; printf("coroutine async after event\n"); - assert(warp_t::get_current_warp() != nullptr); + IRIS_ASSERT(warp_t::get_current_warp() != nullptr); co_await iris_switch(&warp_script); printf("coroutine async script ticks\n"); diff --git a/test/iris_system_demo.cpp b/test/iris_system_demo.cpp index bbb8016..e6a1fb5 100644 --- a/test/iris_system_demo.cpp +++ b/test/iris_system_demo.cpp @@ -108,7 +108,7 @@ int main(void) { matrix_system.for_each([](entity_t entity, iris_component_matrix_t& matrix) { // initialize with identity matrix - assert(matrix.values[0][0] == 1); + IRIS_ASSERT(matrix.values[0][0] == 1); }); matrix_system.for_entity(0, [](iris_component_matrix_t& matrix) { @@ -130,7 +130,7 @@ int main(void) { systems.for_each_batch(4, [](size_t count, iris_queue_list_t::iterator it) { while (count-- != 0) { - assert(it->values[3][3] == 2); + IRIS_ASSERT(it->values[3][3] == 2); it++; } }); @@ -139,21 +139,21 @@ int main(void) { systems.for_each([&counter](entity_t e, uint8_t& i) { counter--; }); - assert(counter == 5); + IRIS_ASSERT(counter == 5); systems.attach(other_system); systems.for_each([&counter](float& i) { counter--; }); - assert(counter == 0); + IRIS_ASSERT(counter == 0); iris_system_t re_system; systems.attach(re_system); re_system.insert(0, 1u); systems.remove(0); re_system.for_each([](entity_t entity) { - assert(false); // already removed + IRIS_ASSERT(false); // already removed }); re_system.clear();