File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ namespace dynamicgraph {
61
61
#define SEND_WARNING_STREAM_MSG (msg ) SEND_MSG(msg, MSG_TYPE_WARNING_STREAM)
62
62
#define SEND_ERROR_STREAM_MSG (msg ) SEND_MSG(msg, MSG_TYPE_ERROR_STREAM)
63
63
64
- template <typename T>
65
- std::string toString (const T& v, const int precision= 3 , const int width=- 1 )
66
- {
64
+ template <typename T>
65
+ std::string toString (const T & v, const int precision = 3 ,
66
+ const int width = - 1 ) {
67
67
std::stringstream ss;
68
- if (width> precision)
69
- ss<< std::fixed<< std::setw (width)<< std::setprecision (precision)<< v;
68
+ if (width > precision)
69
+ ss << std::fixed << std::setw (width) << std::setprecision (precision) << v;
70
70
else
71
- ss<< std::fixed<< std::setprecision (precision)<< v;
71
+ ss << std::fixed << std::setprecision (precision) << v;
72
72
return ss.str ();
73
73
}
74
74
Original file line number Diff line number Diff line change @@ -51,15 +51,17 @@ class CustomEntity : public Entity {
51
51
sendMsg (" This is a message of level MSG_TYPE_ERROR_STREAM" ,
52
52
MSG_TYPE_ERROR_STREAM);
53
53
/* Add test toString */
54
- double q= 1.0 ;
55
- sendMsg (" Value to display: " + toString (q));
54
+ double q = 1.0 ;
55
+ sendMsg (" Value to display: " + toString (q));
56
56
std::vector<double > vq;
57
57
vq.resize (3 );
58
- vq[0 ] = 1.0 ; vq[1 ] = 2.0 ; vq[2 ] = 3.0 ;
59
- sendMsg (" Value to display: " +toString (vq));
60
- Eigen::Matrix<double ,3 ,3 > an_eig_m;
58
+ vq[0 ] = 1.0 ;
59
+ vq[1 ] = 2.0 ;
60
+ vq[2 ] = 3.0 ;
61
+ sendMsg (" Value to display: " + toString (vq));
62
+ Eigen::Matrix<double , 3 , 3 > an_eig_m;
61
63
an_eig_m.Ones ();
62
- sendMsg (" Value to display: " + toString (an_eig_m));
64
+ sendMsg (" Value to display: " + toString (an_eig_m));
63
65
logger_.countdown ();
64
66
}
65
67
};
You can’t perform that action at this time.
0 commit comments