]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkStructuredPointsReader.cxx
re indent
[bbtk.git] / packages / vtk / src / bbvtkStructuredPointsReader.cxx
index 9d3d6a06e70805a1e6cc5b5a0e8f61ef12550ab5..74f6d6bf3b73cd7dd0a570a010551ebb835f4e58 100644 (file)
@@ -26,11 +26,18 @@ void StructuredPointsReader::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-       
-       spr -> SetFileName( bbGetInputIn().c_str() );
-       sp = spr->GetOutput();
-       sp -> Update();
-       bbSetOutputOut( sp );
+    //warning: comparison with string literal results in unspecified behaviour
+       //if ( bbGetInputIn().c_str()!="")
+    std::string empty("");  // JPR
+    if ( bbGetInputIn().c_str()!=empty)
+       {
+               spr -> SetFileName( bbGetInputIn().c_str() );
+               sp = spr->GetOutput();
+               sp -> Update();
+               bbSetOutputOut( sp );
+       } else {
+               bbSetOutputOut( NULL );
+       }
        
 }
 //===== 
@@ -42,7 +49,8 @@ void StructuredPointsReader::bbUserSetDefaultValues()
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
    bbSetInputIn("");
-  
+   bbSetOutputOut( NULL );
+
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)