From fc203c7d763e7417b80238d33fbb761a549ad6c6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 12 Apr 2022 15:19:16 +0200 Subject: [PATCH] Minor fix to sastisfy PVS-Studio warning. (amend, 3nd attempt: this is a false positive from PVS studio) --- imgui.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 1eda2614..c7aefc44 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2248,18 +2248,15 @@ void ImGuiStorage::SetAllInt(int v) //----------------------------------------------------------------------------- // Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" -ImGuiTextFilter::ImGuiTextFilter(const char* default_filter) +ImGuiTextFilter::ImGuiTextFilter(const char* default_filter) //-V1077 { + InputBuf[0] = 0; + CountGrep = 0; if (default_filter) { ImStrncpy(InputBuf, default_filter, IM_ARRAYSIZE(InputBuf)); Build(); } - else - { - InputBuf[0] = 0; - CountGrep = 0; - } } bool ImGuiTextFilter::Draw(const char* label, float width)