Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_stringref.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-06-29 16:31:05 +0100
committerPhil Nash2017-06-29 16:31:05 +0100
commit0016362f69804ae18953a0ec11d0c108e8402e1d (patch)
treee6d4fe545ba78f95cae05399179f17d12e379fae /include/internal/catch_stringref.cpp
parent63a8017ba7dd11ab585c50d6be1c100ccd286a2c (diff)
downloadcatch3-0016362f69804ae18953a0ec11d0c108e8402e1d.tar.gz
explicit conversion from size_t to size_type
Diffstat (limited to 'include/internal/catch_stringref.cpp')
-rw-r--r--include/internal/catch_stringref.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/internal/catch_stringref.cpp b/include/internal/catch_stringref.cpp
index 147564de..4ee4f7dd 100644
--- a/include/internal/catch_stringref.cpp
+++ b/include/internal/catch_stringref.cpp
@@ -40,14 +40,14 @@ namespace Catch {
StringRef::StringRef( char const* rawChars ) noexcept
: m_start( rawChars ),
- m_size( std::strlen( rawChars ) )
+ m_size( static_cast<size_type>( std::strlen( rawChars ) ) )
{}
StringRef::StringRef( char const* rawChars, size_type size ) noexcept
: m_start( rawChars ),
m_size( size )
{
- size_type rawSize = rawChars == nullptr ? 0 : std::strlen( rawChars );
+ size_type rawSize = rawChars == nullptr ? 0 : static_cast<size_type>( std::strlen( rawChars ) );
if( rawSize < size )
size = rawSize;
}