Index: /issm/trunk/src/c/DataSet/Inputs.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3860)
+++ /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3861)
@@ -48,16 +48,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -72,13 +76,17 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
 		/*we could not find an input with the correct enum type. Return the default value: */
 		*pvalue=defaultvalue;
@@ -94,16 +102,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -120,16 +132,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -145,16 +161,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -169,15 +189,19 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
 		/*we could not find an input with the correct enum type. Return the default values: */
-		for(i=0;i<numgauss;i++)values[i]=defaultvalues[i];
+		for(i=0;i<numgauss;i++) values[i]=defaultvalues[i];
 	}
 	else{
@@ -192,16 +216,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -216,16 +244,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -240,16 +272,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -264,16 +300,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
@@ -288,16 +328,20 @@
 	vector<Object*>::iterator object;
 	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	bool   found=false;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type){
+			found=true;
+			break;
+		}
+	}
+
+	if (!found){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumAsString(enum_type));
 	}
 
