You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Main difference:
Indentiation in spaces: ROS: 4, Google: 2 (I vote for Google)
Curly bracket on new line for conditionals: ROS: yes, Google: no (I vote for Google)
Initializer list break: ROS: no, Google: yes (I vote for ROS)
ROS:
/* * A sample source file for the code formatter preview*/
#include<math.h>classPoint
{
public:Point(double x, double y) :
x(x), y(y)
{
}
doubledistance(constPoint& other) const;
double x;
double y;
};
doublePoint::distance(constPoint& other) const
{
double dx = x - other.x;
double dy = y - other.y;
returnsqrt(dx * dx + dy * dy);
}
I would vote for Google which formatted the following example:
/* * A sample source file for the code formatter preview*/
#include<math.h>classPoint {
public:Point(double x, double y)
: x(x),
y(y) {
}
doubledistance(constPoint& other) const;
double x;
double y;
};
doublePoint::distance(constPoint& other) const {
double dx = x - other.x;
double dy = y - other.y;
returnsqrt(dx * dx + dy * dy);
}
The text was updated successfully, but these errors were encountered:
ROS and google are quite similar.
http://google-styleguide.googlecode.com/svn/trunk/eclipse-cpp-google-style.xml
http://www.ros.org/wiki/IDEs?action=AttachFile&do=view&target=ROS_format.xml
Main difference:
Indentiation in spaces: ROS: 4, Google: 2 (I vote for Google)
Curly bracket on new line for conditionals: ROS: yes, Google: no (I vote for Google)
Initializer list break: ROS: no, Google: yes (I vote for ROS)
ROS:
I would vote for Google which formatted the following example:
The text was updated successfully, but these errors were encountered: