coin-or / ADOL-C

A Package for Automatic Differentiation of Algorithms Written in C/C++
Other
146 stars 31 forks source link

Formatter style #72

Closed TimSiebert1 closed 2 weeks ago

TimSiebert1 commented 3 weeks ago

Hi,

i would like to add a formatter style for 'clang-format' (usable in command line, vscode, emacs, vim, etc..) to unify our code format. The current style is the llvm-style with a different macro indentation.

The PR includes:

I prefer the latter style, but lets discuss it.

TimSiebert1 commented 3 weeks ago

Thats interesting. The formatting changes the order of '#include', which results in the definition of 'snprintf' with '_snprintf' on windows systems. This is not allowed anymore and the definition can simply be removed: https://stackoverflow.com/questions/27754492/vs-2015-compiling-cocos2d-x-3-3-error-fatal-error-c1189-error-macro-definiti

CLAassistant commented 2 weeks ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

:white_check_mark: TimSiebert1
:white_check_mark: juanlucasrey
:x: Clang Robot


Clang Robot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

TimSiebert1 commented 2 weeks ago

I will make a different PR with all formatted files