Skip to content

Commit 8ec390f

Browse files
committed
Better fix for unused size_result
1 parent dc9b2fc commit 8ec390f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

natvis/object_visualizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,8 @@ std::wstring string_to_wstring(std::string_view const& str)
612612
}
613613

614614
std::wstring result(size, L'?');
615-
auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast<int>(str.size()), result.data(), size);
615+
[[maybe_unused]] auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast<int>(str.size()), result.data(), size);
616+
XLANG_ASSERT(size == size_result);
616617
return result;
617618
}
618619

0 commit comments

Comments
 (0)