Index: /issm/trunk-jpl/src/c/datastructures/DataSet.cpp
===================================================================
--- /issm/trunk-jpl/src/c/datastructures/DataSet.cpp	(revision 19219)
+++ /issm/trunk-jpl/src/c/datastructures/DataSet.cpp	(revision 19220)
@@ -92,5 +92,5 @@
 	int obj_enum;
 	int i;
-	
+
 	if(marshall_direction==MARSHALLING_FORWARD || marshall_direction==MARSHALLING_SIZE){
 		numsorted=objects.size();
@@ -121,5 +121,4 @@
 			/*Recover enum of object first: */
 			MARSHALLING_ENUM(obj_enum); 
-
 			/*Reset the file pointer to point again to the beginning of the object: */
 			*pmarshalled_data-=sizeof(int);
@@ -127,32 +126,32 @@
 			/*Giant case statement to spin-up the right object, and demarshall into it the information 
 			 *stored in the buffer: */
-			switch(enum_type){
-				case NodeEnum:{
+			if(obj_enum==NodeEnum){
 					Node* node=NULL;
 					node=new Node();
 					node->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
-					this->AddObject(node);}
-					break;
-				case VertexEnum:{
-					Vertex* vertex=NULL;
-					vertex=new Vertex();
-					vertex->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
-					this->AddObject(vertex);}
-					break;
-				case DoubleParamEnum:{
-					DoubleParam* doubleparam=NULL;
-					doubleparam=new DoubleParam();
-					doubleparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
-					this->AddObject(doubleparam);}
-					break;
-				case IntParamEnum:{
-					IntParam* intparam=NULL;
-					intparam=new IntParam();
-					intparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
-					this->AddObject(intparam);}
-					break;
-				default:
-					_error_("could not recognize enum type: " << EnumToStringx(enum_type));
+					this->AddObject(node);
 			}
+			else if(obj_enum==VertexEnum){
+				Vertex* vertex=NULL;
+				vertex=new Vertex();
+				vertex->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
+				this->AddObject(vertex);
+				break;
+			}
+			else if(obj_enum==DoubleParamEnum){
+				DoubleParam* doubleparam=NULL;
+				doubleparam=new DoubleParam();
+				doubleparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
+				this->AddObject(doubleparam);
+				break;
+			}
+			else if(obj_enum==IntParamEnum){
+				IntParam* intparam=NULL;
+				intparam=new IntParam();
+				intparam->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
+				this->AddObject(intparam);
+				break;
+			}
+			else _error_("could not recognize enum type: " << obj_enum); 
 		}
 	}
