diff --git a/.clang-format b/.clang-format index b2ce7c0e6df0152c3ab0697053d14af385407722..d617cd54e81c5d7212b12acbcb64ff2348f55c85 100644 --- a/.clang-format +++ b/.clang-format @@ -19,9 +19,11 @@ BreakInheritanceList: AfterColon Cpp11BracedListStyle: true DeriveLineEnding: false IndentPPDirectives: AfterHash +InsertNewlineAtEOF: true PackConstructorInitializers: NextLine PPIndentWidth: 1 PointerAlignment: Left +RemoveSemicolon: true SpaceAfterTemplateKeyword: false SpaceBeforeParens: ControlStatements SpaceBeforeCpp11BracedList: true diff --git a/mex/sources/k_order_welfare/approximation_welfare.cc b/mex/sources/k_order_welfare/approximation_welfare.cc index bb56d6e49b3705750f82bf3736acac8d7f9b9309..da65f4d826bdfe6df5170d64ae9a4d7bd23c8f92 100644 --- a/mex/sources/k_order_welfare/approximation_welfare.cc +++ b/mex/sources/k_order_welfare/approximation_welfare.cc @@ -71,4 +71,4 @@ void ApproximationWelfare::saveRuleDerivs(const FGSContainer& W) { cond_ders = std::make_unique<FGSContainer>(W); -} \ No newline at end of file +} diff --git a/mex/sources/libkorder/kord/kord_exception.hh b/mex/sources/libkorder/kord/kord_exception.hh index 83508ab924063d054df661360a71e48e7d75a38c..da2ddefd366640473984cefe044cf625cd6bdd3c 100644 --- a/mex/sources/libkorder/kord/kord_exception.hh +++ b/mex/sources/libkorder/kord/kord_exception.hh @@ -31,14 +31,14 @@ #define KORD_RAISE(mes) throw KordException(__FILE__, __LINE__, mes); #define KORD_RAISE_IF(expr, mes) \ - if (expr) \ - throw KordException(__FILE__, __LINE__, mes); + if (expr) \ + throw KordException(__FILE__, __LINE__, mes); #define KORD_RAISE_X(mes, c) throw KordException(__FILE__, __LINE__, mes, c); #define KORD_RAISE_IF_X(expr, mes, c) \ - if (expr) \ - throw KordException(__FILE__, __LINE__, mes, c); + if (expr) \ + throw KordException(__FILE__, __LINE__, mes, c); class KordException { diff --git a/mex/sources/libkorder/tl/permutation.hh b/mex/sources/libkorder/tl/permutation.hh index a799532a0ea3ded51e6464e54760e6889e2b032b..e6ead9ccc17594f478ca1dc278a490b01b9c8e27 100644 --- a/mex/sources/libkorder/tl/permutation.hh +++ b/mex/sources/libkorder/tl/permutation.hh @@ -87,7 +87,7 @@ public: explicit Permutation(const IntSequence& s) : permap(s.size()) { computeSortingMap(s); - }; + } Permutation(const Permutation& p1, const Permutation& p2) : permap(p2.permap) { p1.apply(permap); diff --git a/mex/sources/libkorder/tl/tl_exception.hh b/mex/sources/libkorder/tl/tl_exception.hh index ff5adc8061c986965e4bcfc5e525ad7de748b6df..3c920e86ced7925e2640ef154c9cb97fe0792f4a 100644 --- a/mex/sources/libkorder/tl/tl_exception.hh +++ b/mex/sources/libkorder/tl/tl_exception.hh @@ -62,8 +62,8 @@ #define TL_RAISE(mes) throw TLException(__FILE__, __LINE__, mes) #define TL_RAISE_IF(expr, mes) \ - if (TL_DEBUG >= TL_DEBUG_EXCEPTION && (expr)) \ - throw TLException(__FILE__, __LINE__, mes); + if (TL_DEBUG >= TL_DEBUG_EXCEPTION && (expr)) \ + throw TLException(__FILE__, __LINE__, mes); /* Primitive exception class containing file name, line number and message. */