From c500a84be554d06c6f81cc9973ebb5629ea2b394 Mon Sep 17 00:00:00 2001 From: sapphonie Date: Thu, 2 Sep 2021 19:33:59 -0400 Subject: [PATCH] Fix "declaration of swap must be available" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes ```../hl2sdk-sdk2013/public/tier1/utlblockmemory.h:141:2: error: there are no arguments to ‘swap’ that depend on a template parameter, so a declaration of ‘swap’ must be available [-fpermissive] 141 | swap( m_nBlocks, mem.m_nBlocks ); | ^~~~``` --- public/tier1/utlblockmemory.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/tier1/utlblockmemory.h b/public/tier1/utlblockmemory.h index 510d3846..9498f720 100644 --- a/public/tier1/utlblockmemory.h +++ b/public/tier1/utlblockmemory.h @@ -137,10 +137,10 @@ CUtlBlockMemory::~CUtlBlockMemory() template< class T, class I > void CUtlBlockMemory::Swap( CUtlBlockMemory< T, I > &mem ) { - swap( m_pMemory, mem.m_pMemory ); - swap( m_nBlocks, mem.m_nBlocks ); - swap( m_nIndexMask, mem.m_nIndexMask ); - swap( m_nIndexShift, mem.m_nIndexShift ); + V_swap( m_pMemory, mem.m_pMemory ); + V_swap( m_nBlocks, mem.m_nBlocks ); + V_swap( m_nIndexMask, mem.m_nIndexMask ); + V_swap( m_nIndexShift, mem.m_nIndexShift ); }