From deb48cfa48a8656115ba0340da2201b0068c821f Mon Sep 17 00:00:00 2001 From: conrad Date: Mon, 21 Dec 2020 13:21:39 +1000 Subject: [PATCH] simplification --- include/armadillo_bits/arma_ostream_bones.hpp | 2 +- include/armadillo_bits/arma_ostream_meat.hpp | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/armadillo_bits/arma_ostream_bones.hpp b/include/armadillo_bits/arma_ostream_bones.hpp index 3a80f407..b18e0ab8 100644 --- a/include/armadillo_bits/arma_ostream_bones.hpp +++ b/include/armadillo_bits/arma_ostream_bones.hpp @@ -69,7 +69,7 @@ class arma_ostream arma_cold inline static void print(std::ostream& o, const SizeCube& S); template arma_cold inline static void brief_print(std::ostream& o, const Mat& m, const bool print_size = true); - template arma_cold inline static void brief_print(std::ostream& o, const Cube& m, const bool print_size = true); + template arma_cold inline static void brief_print(std::ostream& o, const Cube& m); template arma_cold inline static void brief_print(std::ostream& o, const SpMat& m); }; diff --git a/include/armadillo_bits/arma_ostream_meat.hpp b/include/armadillo_bits/arma_ostream_meat.hpp index 7ec1d1a6..46351746 100644 --- a/include/armadillo_bits/arma_ostream_meat.hpp +++ b/include/armadillo_bits/arma_ostream_meat.hpp @@ -1067,21 +1067,18 @@ template arma_cold inline void -arma_ostream::brief_print(std::ostream& o, const Cube& x, const bool print_size) +arma_ostream::brief_print(std::ostream& o, const Cube& x) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); - if(print_size) - { - o.unsetf(ios::showbase); - o.unsetf(ios::uppercase); - o.unsetf(ios::showpos); - o.setf(ios::fixed); - - o << "[cube size: " << x.n_rows << 'x' << x.n_cols << 'x' << x.n_slices << "]\n"; - } + o.unsetf(ios::showbase); + o.unsetf(ios::uppercase); + o.unsetf(ios::showpos); + o.setf(ios::fixed); + + o << "[cube size: " << x.n_rows << 'x' << x.n_cols << 'x' << x.n_slices << "]\n"; if(x.n_elem == 0) { o.flush(); stream_state.restore(o); return; }