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]; // 零拷贝原位返回 }