Skip to content

Commit

Permalink
Add explicit casts to atomic_ref_count (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
timguen authored Sep 9, 2022
1 parent d029f04 commit 380cb8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions strings/base_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace winrt::impl

uint32_t operator++() noexcept
{
return m_count.fetch_add(1, std::memory_order_relaxed) + 1;
return static_cast<uint32_t>(m_count.fetch_add(1, std::memory_order_relaxed) + 1);
}

uint32_t operator--() noexcept
Expand All @@ -32,12 +32,12 @@ namespace winrt::impl
abort();
}

return remaining;
return static_cast<uint32_t>(remaining);
}

operator uint32_t() const noexcept
{
return m_count;
return static_cast<uint32_t>(m_count);
}

private:
Expand Down

0 comments on commit 380cb8f

Please sign in to comment.