From 3a4717a9d858a7be6bff99a557bbb71bf91cd52d Mon Sep 17 00:00:00 2001 From: Chen Peng Date: Sun, 30 Aug 2026 13:01:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=9F=BA=E7=A1=80=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Foundation/c_StringList.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Foundation/c_StringList.h b/Foundation/c_StringList.h index c82a49a..5bf1c06 100644 --- a/Foundation/c_StringList.h +++ b/Foundation/c_StringList.h @@ -37,11 +37,13 @@ c_err_t c_StringList_Clone(c_StringList* dest, const c_StringList* src); c_err_t c_StringList_Deduplicate(c_StringList* self); // 极致高频内联只读窥探接口 -C_STATIC_FORCE_INLINE c_size_t c_StringList_Size(const c_StringList* self) { +C_STATIC_FORCE_INLINE +c_size_t c_StringList_Size(const c_StringList* self) { return self ? self->size : 0; // O(1) 实时读取 } -C_STATIC_FORCE_INLINE const char* c_StringList_Get(const c_StringList* self, c_size_t index) { +C_STATIC_FORCE_INLINE +const char* c_StringList_Get(const c_StringList* self, c_size_t index) { if (!self || index >= self->size || !self->strings) return NULL; return self->strings[index]; // 零拷贝原位返回 }