From 7fd21fd0a043cb54a9c6362b4c0fa025e05d7113 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 30 Aug 2006 23:00:18 +0000
Subject: [PATCH] store partition number as a short (instead of a full integer)

---
 Geo/MElement.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Geo/MElement.h b/Geo/MElement.h
index 6d9122fa67..9fb1c068e7 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -46,12 +46,13 @@ class MElement
 {
  private:
   static int _globalNum;
-  int _num, _partition;
+  int _num;
+  short _partition;
   char _visible;
 
  public :
   MElement(int num=0, int part=0) 
-    : _partition(part), _visible(true) 
+    : _visible(true) 
   {
     if(num){
       _num = num;
@@ -60,6 +61,7 @@ class MElement
     else{
       _num = ++_globalNum;
     }
+    _partition = (short)part; 
   }
   virtual ~MElement(){}
 
@@ -77,7 +79,7 @@ class MElement
 
   // get/set the partition to which the element belongs
   virtual int getPartition(){ return _partition; }
-  virtual void setPartition(int num){ _partition = num; }
+  virtual void setPartition(int num){ _partition = (short)num; }
 
   // get/set the visibility flag
   virtual char getVisibility(){ return _visible; }
-- 
GitLab