Warn for zero values in Layer.setMinimalSize() & setMinimalSpacing().

This commit is contained in:
Jean-Paul Chaput 2020-11-11 13:45:15 +01:00
parent 61b9817421
commit 03bfc091c3
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include "hurricane/Layer.h"
#include "hurricane/BasicLayer.h"
#include "hurricane/Error.h"
#include "hurricane/Warning.h"
namespace Hurricane {
@ -167,12 +168,18 @@ namespace Hurricane {
void Layer::setMinimalSize ( const DbU::Unit& minimalSize )
{
if (minimalSize == 0)
cerr << Warning( "Layer::setMinimalSize(): Suspicious zero size for layer \"%s\"."
, getString(getName()).c_str()) << endl;
_minimalSize = minimalSize;
}
void Layer::setMinimalSpacing ( const DbU::Unit& minimalSpacing )
{
if (minimalSpacing == 0)
cerr << Warning( "Layer::setMinimalSpacing(): Suspicious zero size for layer \"%s\"."
, getString(getName()).c_str()) << endl;
_minimalSpacing = minimalSpacing;
}