Skip to content

Commit 380cb8f

Browse files
authored
Add explicit casts to atomic_ref_count (#1181)
1 parent d029f04 commit 380cb8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

strings/base_string.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace winrt::impl
1616

1717
uint32_t operator++() noexcept
1818
{
19-
return m_count.fetch_add(1, std::memory_order_relaxed) + 1;
19+
return static_cast<uint32_t>(m_count.fetch_add(1, std::memory_order_relaxed) + 1);
2020
}
2121

2222
uint32_t operator--() noexcept
@@ -32,12 +32,12 @@ namespace winrt::impl
3232
abort();
3333
}
3434

35-
return remaining;
35+
return static_cast<uint32_t>(remaining);
3636
}
3737

3838
operator uint32_t() const noexcept
3939
{
40-
return m_count;
40+
return static_cast<uint32_t>(m_count);
4141
}
4242

4343
private:

0 commit comments

Comments
 (0)