Skip to content

Commit

Permalink
🔀 Merge pull request #114 from DVLab-NTU/bug/fix-read-permissions
Browse files Browse the repository at this point in the history
🐛 Fix reader permissions
  • Loading branch information
chinyi0523 authored Apr 13, 2024
2 parents 80951bc + 108cc1b commit 73a4fe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/qcir/qcir_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ std::optional<QCir> 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;
Expand Down Expand Up @@ -122,7 +122,7 @@ std::optional<QCir> from_qasm(std::filesystem::path const& filepath) {
std::optional<QCir> 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;
Expand Down
2 changes: 1 addition & 1 deletion src/zx/zx_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73a4fe9

Please sign in to comment.