Skip to content

Commit

Permalink
Workaround for false positive code analysis warning (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Feb 6, 2023
1 parent 047c179 commit 3bbee2c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions strings/base_implements.h
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,7 @@ namespace winrt::impl
return decode_weak_ref(count_or_pointer)->get_source();
}

com_ptr<weak_ref_t> weak_ref;
*weak_ref.put() = new (std::nothrow) weak_ref_t(get_unknown(), static_cast<uint32_t>(count_or_pointer));
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);

if (!weak_ref)
{
Expand Down

0 comments on commit 3bbee2c

Please sign in to comment.