From ca3bde9f205ce7c2d2b86ac94d3dde7c5e2c9658 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Thu, 18 Jul 2013 13:07:50 +0100 Subject: [PATCH] BUG: labelBits: allow negative labels --- src/OpenFOAM/algorithms/indexedOctree/labelBits.H | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/algorithms/indexedOctree/labelBits.H b/src/OpenFOAM/algorithms/indexedOctree/labelBits.H index e8037a3bd3d..757fd73621e 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/labelBits.H +++ b/src/OpenFOAM/algorithms/indexedOctree/labelBits.H @@ -35,7 +35,7 @@ SourceFiles #define labelBits_H #include "label.H" -#include "uLabel.H" +//#include "uLabel.H" #include "direction.H" #include "error.H" @@ -55,15 +55,17 @@ class labelBits label data_; - inline static label pack(const uLabel val, const direction bits) + inline static label pack(const label val, const direction bits) { # ifdef FULLDEBUG if (bits > 7 || (((val<<3)>>3) != val)) { FatalErrorIn ( - "labelBits::pack(const uLabel, const direction)" + "labelBits::pack(const label, const direction)" ) << "Direction " << bits << " outside range 0..7" + << " or value " << val << " negative or larger than " + << label(8*sizeof(label)-3) << " bit representation" << abort(FatalError); } # endif -- GitLab