diff --git a/.clang-format b/.clang-format index 5650f22c0..886526dec 100644 --- a/.clang-format +++ b/.clang-format @@ -1,2 +1,16 @@ BasedOnStyle: Google DerivePointerAlignment: false + +# Starting from clang-format v19 we need to specify those +AttributeMacros: [ + G2O_CSPARSE_EXTENSION_API, G2O_SOLVER_CSPARSE_API, + G2O_STUFF_API, G2O_CORE_API, + G2O_TYPES_DATA_API, + G2O_TYPES_SLAM2D_API, G2O_TYPES_SLAM2D_ADDONS_API, + G2O_TYPES_SLAM3D_API, G2O_TYPES_SLAM3D_ADDONS_API, + G2O_TYPES_ICP_API, G2O_TYPES_SBA_API, + G2O_TYPES_SIM3_API, G2O_TYPES_SCLAM2D_API, + G2O_SLAM2D_LINEAR_API, + G2O_SIMULATOR_API + G2O_CLI_API, G2O_VIEWER_API +] diff --git a/g2o/core/hyper_graph_action.h b/g2o/core/hyper_graph_action.h index 3a79adc85..004d92830 100644 --- a/g2o/core/hyper_graph_action.h +++ b/g2o/core/hyper_graph_action.h @@ -178,10 +178,10 @@ class G2O_CORE_API HyperGraphActionLibrary { /** * apply an action to all the elements of the graph. */ -void G2O_CORE_API -applyAction(HyperGraph* graph, HyperGraphElementAction* action, - HyperGraphElementAction::Parameters* parameters = 0, - const std::string& typeName = ""); +void G2O_CORE_API applyAction( + HyperGraph* graph, HyperGraphElementAction* action, + HyperGraphElementAction::Parameters* parameters = 0, + const std::string& typeName = ""); /** * brief write into gnuplot