diff --git a/src/qcir/qcir_reader.cpp b/src/qcir/qcir_reader.cpp index 4ecf2260..1fe0a189 100644 --- a/src/qcir/qcir_reader.cpp +++ b/src/qcir/qcir_reader.cpp @@ -48,7 +48,7 @@ std::optional from_qasm(std::filesystem::path const& filepath) { using dvlab::str::str_get_token; // read file and open - std::fstream qasm_file{filepath}; + std::ifstream qasm_file{filepath}; if (!qasm_file.is_open()) { spdlog::error("Cannot open the QASM file \"{}\"!!", filepath); return std::nullopt; @@ -122,7 +122,7 @@ std::optional from_qasm(std::filesystem::path const& filepath) { std::optional from_qc(std::filesystem::path const& filepath) { using dvlab::str::str_get_token; // read file and open - std::fstream qc_file{filepath}; + std::ifstream qc_file{filepath}; if (!qc_file.is_open()) { spdlog::error("Cannot open the QC file \"{}\"!!", filepath); return std::nullopt; diff --git a/src/zx/zx_io.cpp b/src/zx/zx_io.cpp index 80c1128c..8eee50f5 100644 --- a/src/zx/zx_io.cpp +++ b/src/zx/zx_io.cpp @@ -565,7 +565,7 @@ bool ZXGraph::write_tikz(std::string const& filename) const { } /** - * @brief write tikz file to the fstream `tikzFile` + * @brief write tikz file to the ostream `tikzFile` * * @param tikzFile * @return true if the filename is valid