From febd1523e33bf5967a5556ec64c3d3057c54726e Mon Sep 17 00:00:00 2001 From: NormandAlexandre <101646057+NormandAlexandre@users.noreply.github.com> Date: Thu, 7 Jul 2022 12:45:44 -0600 Subject: [PATCH] Handle newlines in external partition file (#87) * external_partion fixed * Update external_partition.hpp * Update utility.cpp Co-authored-by: ALEXANDRE NORMAND --- core/utility.cpp | 8 +++++++- core/utility.hpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/utility.cpp b/core/utility.cpp index f4874b50..7ec92cd0 100644 --- a/core/utility.cpp +++ b/core/utility.cpp @@ -704,9 +704,14 @@ template function_counts node_functions(const xmg_names&); template function_counts node_functions(const aig_names&); template function_counts node_functions(const xag_names&); } +bool is_digits(const std::string &str) +{ + return std::all_of(str.begin(), str.end(), ::isdigit); // C++11 +} std::vector read_integer_file(string filename) { + std::vector output; std::ifstream ifs; @@ -715,7 +720,8 @@ std::vector read_integer_file(string filename) while (ifs.good()) { std::string part; getline(ifs, part); - if (part != "") + std::cout<<"part:"< read_integer_file(string filename);