We don't need to create allocate the outpute file stream and open the file at
[external/ragel.git] / ragel / cscodegen.cpp
index eddae7d..c653010 100644 (file)
@@ -82,11 +82,6 @@ ostream *csharpOpenOutput( const char *inputFile )
        if ( outputFileName != 0 ) {
                /* Create the filter on the output and open it. */
                outFilter = new output_filter( outputFileName );
-               outFilter->open( outputFileName, ios::out|ios::trunc );
-               if ( !outFilter->is_open() ) {
-                       error() << "error opening " << outputFileName << " for writing" << endl;
-                       exit(1);
-               }
 
                /* Open the output stream, attaching it to the filter. */
                outStream = new ostream( outFilter );