Skip to content

Commit 8e10b7a

Browse files
committed
Minor fix to sastisfy PVS-Studio warning. (amend, 2nd attempt)
1 parent 6d15a50 commit 8e10b7a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

imgui.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -2250,16 +2250,12 @@ void ImGuiStorage::SetAllInt(int v)
22502250
// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
22512251
ImGuiTextFilter::ImGuiTextFilter(const char* default_filter)
22522252
{
2253+
memset(this, 0, sizeof(*this));
22532254
if (default_filter)
22542255
{
22552256
ImStrncpy(InputBuf, default_filter, IM_ARRAYSIZE(InputBuf));
22562257
Build();
22572258
}
2258-
else
2259-
{
2260-
InputBuf[0] = 0;
2261-
CountGrep = 0;
2262-
}
22632259
}
22642260

22652261
bool ImGuiTextFilter::Draw(const char* label, float width)

0 commit comments

Comments
 (0)