From 5df582dd3229789364ae3fa75575fd978ca3282d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 4 Dec 2019 12:38:38 -0500 Subject: Feature/string hash review (#1142) * * Added ConstArrayView * Made StringSlicePool have styles * Remove point about strings not having terminating 0 (they do), and restriction around "" * spCalcStringHash -> spComputeStringHash * Small code improvements. Closer to coding conventions. * Fix small bug with Empty adding c string. * Fix typo in assert. * Fix ArrayView compiling issue on gcc/clang. * Remove tabs. * Improve comments around StringSlicePool. Simplify getting the added slices. --- slang.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index d11c4b7f2..233b418c3 100644 --- a/slang.h +++ b/slang.h @@ -2102,16 +2102,16 @@ extern "C" SLANG_API SlangUInt spReflection_getHashedStringCount( SlangReflection* reflection); - /// Get a hashed string. The number of chars is writtent in outCount. Note the count does *NOT* including terminating 0, - /// and the returned pointer will not generally have a terminating zero. + /// Get a hashed string. The number of chars is written in outCount. + /// The count does *NOT* including terminating 0. The returned string will be 0 terminated. SLANG_API const char* spReflection_getHashedString( SlangReflection* reflection, SlangUInt index, size_t* outCount); - /// Calculate a string hash. - // Count should *NOT* include terminating zero. - SLANG_API int spCalcStringHash(const char* chars, size_t count); + /// Compute a string hash. + /// Count should *NOT* include terminating zero. + SLANG_API int spComputeStringHash(const char* chars, size_t count); #ifdef __cplusplus } -- cgit v1.2.3