-
Notifications
You must be signed in to change notification settings - Fork 392
Contributing to SegMap
rdube edited this page Jul 26, 2018
·
1 revision
- We use the Google-C++ code style (https://google.github.io/styleguide/cppguide.html).
- To install the Google-C++ style sheet in Eclipse, download the eclipse-cpp-google-style.xml file from the http://code.google.com/p/google-styleguide/ repository. In Eclipse, under Window/Preferences select C/C++/Code Style/Formatter. Import the settings file by selecting Import.
- For naming the methods we use camelCase and not CamelCase.
- Each line of text in the code should be at most 100 characters long.
- Every comment MUST start with a capital letter and end with a dot.
- We adopt the space after & or * when passing argument eg.
copyElement(const Element& element)
ormodifyElement(Element* element)
We use the following rules for including headers.
In .cpp
files, put:
- The corresponding header
- A block of system includes
- A block of includes from non-system packages (3rd party, ros, Eigen, etc)
- A block of includes from this package
Separate the blocks by a vertical space and alphabetize within each block. For example, for a file foo.cpp
in my_package
:
#include "my_package/foo.h"
#include <memory>
#include <pthread.h>
#include <string>
#include <Eigen/Core>
#include <glog/logging.h>
#include "my_package/bar.h"
#include "my_package/baz.h"
Header file includes should follow the same structure.
- Follow the pull-request and review work-flow (never push directly to master).
- Prefer pull-requests which are focused on a particular feature/fix.
- One can see all the open PRs and issues where he is mentioned through this link by changing the username: https://github.com/ethz-asl/segmatch/issues?q=is:open+mentions:username Bookmark it!
- Classes or structs containing Eigen fixed type should include the macro
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html