Warn for zero values in Layer.setMinimalSize() & setMinimalSpacing().
This commit is contained in:
parent
61b9817421
commit
03bfc091c3
|
@ -34,6 +34,7 @@
|
||||||
#include "hurricane/Layer.h"
|
#include "hurricane/Layer.h"
|
||||||
#include "hurricane/BasicLayer.h"
|
#include "hurricane/BasicLayer.h"
|
||||||
#include "hurricane/Error.h"
|
#include "hurricane/Error.h"
|
||||||
|
#include "hurricane/Warning.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -167,12 +168,18 @@ namespace Hurricane {
|
||||||
|
|
||||||
void Layer::setMinimalSize ( const DbU::Unit& minimalSize )
|
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;
|
_minimalSize = minimalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Layer::setMinimalSpacing ( const DbU::Unit& minimalSpacing )
|
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;
|
_minimalSpacing = minimalSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue