diff --git a/CommandLineInterface.cpp b/CommandLineInterface.cpp index 609678952..f13500142 100644 --- a/CommandLineInterface.cpp +++ b/CommandLineInterface.cpp @@ -304,8 +304,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da fs::path p(m_args["output-dir"].as()); fs::create_directories(p); ofstream outFile(m_args["output-dir"].as() + "/" + _fileName); - if (!_data.empty()) - outFile << _data; + outFile << _data; if (!outFile) BOOST_THROW_EXCEPTION(FileError() << errinfo_comment("Could not write to file: " + _fileName)); outFile.close(); diff --git a/CommandLineInterface.h b/CommandLineInterface.h index 715f381ba..f79bc0be4 100644 --- a/CommandLineInterface.h +++ b/CommandLineInterface.h @@ -33,12 +33,6 @@ namespace solidity //forward declaration enum class DocumentationType: uint8_t; -enum class OutputType: uint8_t -{ - STDOUT, - FILE, -}; - class CommandLineInterface { public: @@ -66,7 +60,7 @@ private: /// Create a file in the given directory /// @arg _fileName the name of the file /// @arg _data to be written - void createFile(std::string const& _fileName, std::string const& _data = ""); + void createFile(std::string const& _fileName, std::string const& _data); /// Compiler arguments variable map boost::program_options::variables_map m_args;