Skip to content

Commit

Permalink
Fix 'return': conversion from 'size_t' to 'int', possible loss of data
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Dec 24, 2024
1 parent 2ed5d96 commit 8c35325
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/tier0/utlbinaryblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ inline CUtlBinaryBlock::CUtlBinaryBlock( const void* pMemory, int nSizeInBytes )
m_nActualLength = nSizeInBytes;
}

inline CUtlBinaryBlock::CUtlBinaryBlock( const char* pString ) : CUtlBinaryBlock( (const void*)pString, V_strlen(pString) )
inline CUtlBinaryBlock::CUtlBinaryBlock( const char* pString ) : CUtlBinaryBlock( (const void*)pString, static_cast<int>(V_strlen(pString)) )
{
}

Expand Down
2 changes: 1 addition & 1 deletion public/tier0/utlstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ inline int CUtlString::Length() const
{
if(m_pString)
{
return V_strlen( m_pString );
return static_cast<int>(V_strlen( m_pString ));
}
return 0;
}
Expand Down

0 comments on commit 8c35325

Please sign in to comment.