This commit is contained in:
conrad
2020-12-17 15:06:36 +10:00
parent 7e1efbf148
commit fd100e5adb
+16
View File
@@ -41,7 +41,11 @@ BaseCube<elem_type,derived>::print(const std::string extra_text) const
if(extra_text.length() != 0)
{
const std::streamsize orig_width = get_cout_stream().width();
get_cout_stream() << extra_text << '\n';
get_cout_stream().width(orig_width);
}
arma_ostream::print(get_cout_stream(), tmp.M, true);
@@ -61,7 +65,11 @@ BaseCube<elem_type,derived>::print(std::ostream& user_stream, const std::string
if(extra_text.length() != 0)
{
const std::streamsize orig_width = user_stream.width();
user_stream << extra_text << '\n';
user_stream.width(orig_width);
}
arma_ostream::print(user_stream, tmp.M, true);
@@ -81,7 +89,11 @@ BaseCube<elem_type,derived>::raw_print(const std::string extra_text) const
if(extra_text.length() != 0)
{
const std::streamsize orig_width = get_cout_stream().width();
get_cout_stream() << extra_text << '\n';
get_cout_stream().width(orig_width);
}
arma_ostream::print(get_cout_stream(), tmp.M, false);
@@ -101,7 +113,11 @@ BaseCube<elem_type,derived>::raw_print(std::ostream& user_stream, const std::str
if(extra_text.length() != 0)
{
const std::streamsize orig_width = user_stream.width();
user_stream << extra_text << '\n';
user_stream.width(orig_width);
}
arma_ostream::print(user_stream, tmp.M, false);