Prevents unsigned-signed-comparison warnings for container with signed size.

Well, you never know. There are containers that use a signed integer
for storing its size. This results in a warning about comparing signed with
unsigned integers. This commit prevents this by explicitly casting the size
to std::size_t.
This commit is contained in:
Markus Blatt 2015-02-19 09:13:39 +01:00
parent 529662ca1a
commit a458aa7688

View File

@ -148,7 +148,7 @@ public:
{
OPM_THROW(std::runtime_error, "Trying to update owner mask without parallel information!");
}
if( container.size()!= ownerMask_.size() )
if( static_cast<std::size_t>(container.size())!= ownerMask_.size() )
{
ownerMask_.resize(container.size(), 1.);
for( auto i=indexSet_->begin(), end=indexSet_->end(); i!=end; ++i )