use \n instead of endl

release/4.3a0
Varun Agrawal 2020-07-28 09:12:13 -05:00
parent 9bb07851c3
commit 4756f7359d
2 changed files with 4 additions and 4 deletions

View File

@ -83,8 +83,8 @@ public:
}
/// Virtual print function, uses traits
virtual void print(const std::string& str) const {
std::cout << "(" << demangle(typeid(T).name()) << ") " << std::endl;
virtual void print(const std::string& str) const override {
std::cout << "(" << demangle(typeid(T).name()) << ")\n";
traits<T>::Print(value_, str);
}

View File

@ -75,8 +75,8 @@ namespace gtsam {
/* ************************************************************************* */
void Values::print(const string& str, const KeyFormatter& keyFormatter) const {
cout << str << endl;
cout << "Values with " << size() << " values:" << endl;
cout << str << (str == "" ? "" : "\n");
cout << "Values with " << size() << " values:\n";
for(const_iterator key_value = begin(); key_value != end(); ++key_value) {
cout << "Value " << keyFormatter(key_value->key) << ": ";
key_value->value.print("");