diff options
| author | Martin Ridgers <[email protected]> | 2021-12-14 14:34:14 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-12-16 09:35:51 +0100 |
| commit | 05e92c2d0ffbc3c0e653ed6328f39058d38d4e6f (patch) | |
| tree | d2569820885749ed976ef22c14bbf9611ffeecd2 /zencore/include | |
| parent | Commented out unused Base64 decoding table (diff) | |
| download | zen-05e92c2d0ffbc3c0e653ed6328f39058d38d4e6f.tar.xz zen-05e92c2d0ffbc3c0e653ed6328f39058d38d4e6f.zip | |
Use zen::Min() instead of std::min()
Some compilers will struggle to deduce the template type for calls to
std::min() while others are more complicit. The can easliy lead to
unexpected compile errors on a platform.
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/memory.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zencore/include/zencore/memory.h b/zencore/include/zencore/memory.h index aba391c85..313813af9 100644 --- a/zencore/include/zencore/memory.h +++ b/zencore/include/zencore/memory.h @@ -128,7 +128,7 @@ struct MutableMemoryView } /** Modifies the view to be the given number of bytes from the left. */ - constexpr inline void LeftInline(uint64_t InSize) { m_DataEnd = std::min(m_DataEnd, m_Data + InSize); } + constexpr inline void LeftInline(uint64_t InSize) { m_DataEnd = zen::Min(m_DataEnd, m_Data + InSize); } /** Modifies the view to be the middle part by taking up to the given number of bytes from the given offset. */ inline void MidInline(uint64_t InOffset, uint64_t InSize = ~uint64_t(0)) @@ -217,7 +217,7 @@ struct MemoryView /** Modifies the view by chopping the given number of bytes from the left. */ inline void RightChopInline(uint64_t InSize) { - const uint64_t Offset = std::min(GetSize(), InSize); + const uint64_t Offset = zen::Min(GetSize(), InSize); m_Data = GetDataAtOffsetNoCheck(Offset); } @@ -257,7 +257,7 @@ struct MemoryView inline void LeftInline(uint64_t InSize) { InSize = zen::Min(GetSize(), InSize); - m_DataEnd = std::min(m_DataEnd, m_Data + InSize); + m_DataEnd = zen::Min(m_DataEnd, m_Data + InSize); } /** Modifies the view to be the middle part by taking up to the given number of bytes from the given offset. */ |