Skip to content

Commit 3bbee2c

Browse files
authored
Workaround for false positive code analysis warning (#1269)
1 parent 047c179 commit 3bbee2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

strings/base_implements.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,8 +1190,7 @@ namespace winrt::impl
11901190
return decode_weak_ref(count_or_pointer)->get_source();
11911191
}
11921192

1193-
com_ptr<weak_ref_t> weak_ref;
1194-
*weak_ref.put() = new (std::nothrow) weak_ref_t(get_unknown(), static_cast<uint32_t>(count_or_pointer));
1193+
com_ptr<weak_ref_t> weak_ref(new (std::nothrow) weak_ref_t(get_unknown(), static_cast<uint32_t>(count_or_pointer)), take_ownership_from_abi);
11951194

11961195
if (!weak_ref)
11971196
{

0 commit comments

Comments
 (0)