Chromium Code Reviews| Index: core/fxcrt/fx_basic_array.cpp |
| diff --git a/core/fxcrt/fx_basic_array.cpp b/core/fxcrt/fx_basic_array.cpp |
| index 92df0e00f8d4b9d6789382a0d147dc64fb15f119..15daf892f396d72e9d574ded1a255ca2dd74c68b 100644 |
| --- a/core/fxcrt/fx_basic_array.cpp |
| +++ b/core/fxcrt/fx_basic_array.cpp |
| @@ -33,7 +33,7 @@ bool CFX_BasicArray::SetSize(int nNewSize) { |
| m_nSize = m_nMaxSize = 0; |
| return false; |
| } |
| - m_pData = FX_Alloc(uint8_t, totalSize.ValueOrDie()); |
| + m_pData = FX_Alloc(uint8_t, totalSize.ValueOrDie<size_t>()); |
|
jschuh
2017/01/23 17:05:19
Weird. I'm not sure how this compiles without doin
Tom Sepez
2017/01/23 18:19:14
Ok, I'll switch to the functional form just in cas
|
| m_nSize = m_nMaxSize = nNewSize; |
| } else if (nNewSize <= m_nMaxSize) { |
| if (nNewSize > m_nSize) { |
| @@ -48,7 +48,8 @@ bool CFX_BasicArray::SetSize(int nNewSize) { |
| if (!totalSize.IsValid() || nNewMax < m_nSize) { |
| return false; |
| } |
| - uint8_t* pNewData = FX_Realloc(uint8_t, m_pData, totalSize.ValueOrDie()); |
| + uint8_t* pNewData = |
| + FX_Realloc(uint8_t, m_pData, totalSize.ValueOrDie<size_t>()); |
|
jschuh
2017/01/23 17:05:19
Same question for this and the other uses below.
Tom Sepez
2017/01/23 18:19:14
Done.
|
| if (!pNewData) { |
| return false; |
| } |