diff --git a/imgui.cpp b/imgui.cpp index 30d657a9..e64a021d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -816,9 +816,9 @@ int ImFormatStringV(char* buf, int buf_size, const char* fmt, va_list args) return (w == -1) ? buf_size : w; } -// Pass data_size==0 for zero-terminated string +// Pass data_size==0 for zero-terminated strings // FIXME-OPT: Replace with e.g. FNV1a hash? CRC32 pretty much randomly access 1KB. Need to do proper measurements. -ImU32 ImHash(const void* data, int data_size, ImU32 seed = 0) +ImU32 ImHash(const void* data, int data_size, ImU32) { static ImU32 crc32_lut[256] = { 0 }; if (!crc32_lut[1]) diff --git a/imgui_internal.h b/imgui_internal.h index 1ecacba4..8c9b8ab2 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -81,7 +81,7 @@ int ImTextCountCharsFromUtf8(const char* in_text, const char* in int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string as UTF-8 code-points // Helpers: Misc -ImU32 ImHash(const void* data, int data_size, ImU32 seed); +ImU32 ImHash(const void* data, int data_size, ImU32 seed = 0); // Pass data_size==0 for zero-terminated strings bool ImLoadFileToMemory(const char* filename, const char* file_open_mode, void** out_file_data, int* out_file_size = NULL, int padding_bytes = 0); bool ImIsPointInTriangle(const ImVec2& p, const ImVec2& a, const ImVec2& b, const ImVec2& c); static inline bool ImCharIsSpace(int c) { return c == ' ' || c == '\t' || c == 0x3000; }