Skip to content

unify the code styles using the style_unify script#246

Merged
XinfengZhang merged 2 commits intointel:masterfrom
XinfengZhang:coding_style
Sep 30, 2021
Merged

unify the code styles using the style_unify script#246
XinfengZhang merged 2 commits intointel:masterfrom
XinfengZhang:coding_style

Conversation

@XinfengZhang
Copy link
Copy Markdown
Contributor

use astyle to unify the code style
copy the style_unify script from
https://github.com/intel/libva/blob/master/style_unify

Signed-off-by: Carl Zhang carl.zhang@intel.com

use astyle to unify the code style
copy the style_unify script from
https://github.com/intel/libva/blob/master/style_unify

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
Signed-off-by: Carl Zhang <carl.zhang@intel.com>
Copy link
Copy Markdown

@uartie uartie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not fond of how some of the C++ code is auto-formatted by astyle, especially the lambdas. Not sure if there are better auto-formatters out there for C++ as I don't use them much.

But, unified code style is generally a good thing... so LGTM.

Comment on lines 129 to +132
std::for_each(supported.begin(), supported.end(),
[](VAConfigAttrib& s) { s.value = 0; });
[](VAConfigAttrib & s) {
s.value = 0;
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems astyle struggles with lambda expressions. Depending on how it's originally formatted, astyle results can differ. I suppose this one is acceptable, though.

@XinfengZhang
Copy link
Copy Markdown
Contributor Author

yes , 3.1 is latest astyle version, and was released in 2018. suppose need improvement for C++ new features.

@XinfengZhang XinfengZhang merged commit 25f021c into intel:master Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants