[opengtl-commits] [581] assert when the number of channels is null |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 581
Author: cyrille
Date: 2009-03-02 13:22:42 +0100 (Mon, 02 Mar 2009)
Log Message:
-----------
assert when the number of channels is null
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/PixelDescription.cpp
Modified: trunk/OpenGTL/OpenGTL/GTLCore/PixelDescription.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/PixelDescription.cpp 2009-03-02 11:54:30 UTC (rev 580)
+++ trunk/OpenGTL/OpenGTL/GTLCore/PixelDescription.cpp 2009-03-02 12:22:42 UTC (rev 581)
@@ -43,6 +43,7 @@
PixelDescription::PixelDescription( const Type* channelType_, int channels_) : d(new Private)
{
+ GTL_ASSERT( channels_ > 0);
GTL_ASSERT( channelType_->bitsSize() > 0 );
d->bitsSize = channels_ * channelType_->bitsSize();
d->channelsType.reserve(channels_);
@@ -55,6 +56,7 @@
PixelDescription::PixelDescription( const std::vector<const Type* >& channelsType_) : d(new Private)
{
+ GTL_ASSERT( channelsType_.size() > 0);
d->channelsType = channelsType_;
d->bitsSize = 0;
for( std::vector<const Type*>::iterator it = d->channelsType.begin();