Fix errors for windows build.

This commit is contained in:
Antonio Sanchez 2021-11-19 04:23:25 +00:00
parent b0fb5417d3
commit c107bd6102

View File

@ -298,14 +298,14 @@ struct TensorPrinter {
} }
for (std::size_t k = 0; k < rank; k++) { for (std::size_t k = 0; k < rank; k++) {
std::size_t separator_index = (k < fmt.separator.size()) ? k : fmt.separator.size() - 1; std::size_t separator_index = (k < fmt.separator.size()) ? k : fmt.separator.size() - 1;
if (is_at_end[k] and if (is_at_end[k] &&
(!is_at_end_before_newline or fmt.separator[separator_index].find('\n') != std::string::npos)) { (!is_at_end_before_newline || fmt.separator[separator_index].find('\n') != std::string::npos)) {
separator << fmt.separator[separator_index]; separator << fmt.separator[separator_index];
} }
} }
for (std::size_t k = 0; k < rank; k++) { for (std::size_t k = 0; k < rank; k++) {
std::size_t spacer_index = (k < fmt.spacer.size()) ? k : fmt.spacer.size() - 1; std::size_t spacer_index = (k < fmt.spacer.size()) ? k : fmt.spacer.size() - 1;
if (i != 0 and is_at_begin_after_newline and (!is_at_begin[k] or k == 0)) { if (i != 0 && is_at_begin_after_newline && (!is_at_begin[k] || k == 0)) {
prefix << fmt.spacer[spacer_index]; prefix << fmt.spacer[spacer_index];
} }
} }