Форматирование

This commit is contained in:
Andrei Astafev 2024-04-08 22:07:28 +03:00
parent def630bc2a
commit 8d4aebdee2
2 changed files with 82 additions and 12 deletions

View File

@ -4,6 +4,8 @@
#include <myx-example-features/processor.hpp> #include <myx-example-features/processor.hpp>
#include <cmath>
#include <QCoreApplication> #include <QCoreApplication>
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
@ -43,11 +45,11 @@ int slowFunction()
double a[size]; double a[size];
for ( int i = 0; i < size; i++ ) { for ( int i = 0; i < size; i++ ) {
#if QT_VERSION >= 0x051000 #if QT_VERSION >= 0x051000
a[i] = QRandomGenerator::global()->bounded( 4 ); a[i] = QRandomGenerator::global()->bounded( 4 );
#else #else
a[i] = std::rand() / (RAND_MAX / 4); a[i] = std::rand() / ( RAND_MAX / 4 );
#endif #endif
for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] ); for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] );
a[0] += a[i]; a[0] += a[i];
} }
@ -64,11 +66,11 @@ int fastFunction()
double a[size]; double a[size];
for ( int i = 0; i < size; i++ ) { for ( int i = 0; i < size; i++ ) {
#if QT_VERSION >= 0x051000 #if QT_VERSION >= 0x051000
a[i] = QRandomGenerator::global()->bounded( 4 ); a[i] = QRandomGenerator::global()->bounded( 4 );
#else #else
a[i] = std::rand() / (RAND_MAX / 4); a[i] = std::rand() / ( RAND_MAX / 4 );
#endif #endif
for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] ); for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] );
a[0] += a[i]; a[0] += a[i];
} }

View File

@ -1,4 +1,4 @@
# Uncrustify-0.77.1_f # Uncrustify-0.78.0_f
# #
# General options # General options
@ -99,6 +99,12 @@ sp_cpp_lambda_square_paren = remove # ignore/add/remove/force/not_defined
# no argument list is present, as in '[] <here> { ... }'. # no argument list is present, as in '[] <here> { ... }'.
sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force/not_defined sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force/not_defined
# Add or remove space after the opening parenthesis and before the closing
# parenthesis of a argument list of a C++11 lambda, as in
# '[]( <here> ){ ... }'
# with an empty list.
sp_cpp_lambda_argument_list_empty = ignore # ignore/add/remove/force/not_defined
# Add or remove space after the opening parenthesis and before the closing # Add or remove space after the opening parenthesis and before the closing
# parenthesis of a argument list of a C++11 lambda, as in # parenthesis of a argument list of a C++11 lambda, as in
# '[]( <here> int x <here> ){ ... }'. # '[]( <here> int x <here> ){ ... }'.
@ -195,6 +201,25 @@ sp_before_ptr_star = remove # ignore/add/remove/force/not_defined
# variable name. If set to ignore, sp_before_ptr_star is used instead. # variable name. If set to ignore, sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star = remove # ignore/add/remove/force/not_defined sp_before_unnamed_ptr_star = remove # ignore/add/remove/force/not_defined
# Add or remove space before pointer star '*' that is followed by a qualifier.
# If set to ignore, sp_before_unnamed_ptr_star is used instead.
sp_before_qualifier_ptr_star = ignore # ignore/add/remove/force/not_defined
# Add or remove space before pointer star '*' that is followed by 'operator' keyword.
# If set to ignore, sp_before_unnamed_ptr_star is used instead.
sp_before_operator_ptr_star = ignore # ignore/add/remove/force/not_defined
# Add or remove space before pointer star '*' that is followed by
# a class scope (as in 'int *MyClass::method()') or namespace scope
# (as in 'int *my_ns::func()').
# If set to ignore, sp_before_unnamed_ptr_star is used instead.
sp_before_scope_ptr_star = ignore # ignore/add/remove/force/not_defined
# Add or remove space before pointer star '*' that is followed by '::',
# as in 'int *::func()'.
# If set to ignore, sp_before_unnamed_ptr_star is used instead.
sp_before_global_scope_ptr_star = ignore # ignore/add/remove/force/not_defined
# Add or remove space between a qualifier and a pointer star '*' that isn't # Add or remove space between a qualifier and a pointer star '*' that isn't
# followed by a variable name, as in '(char const *)'. If set to ignore, # followed by a variable name, as in '(char const *)'. If set to ignore,
# sp_before_ptr_star is used instead. # sp_before_ptr_star is used instead.
@ -203,6 +228,9 @@ sp_qualifier_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined
# Add or remove space between pointer stars '*', as in 'int ***a;'. # Add or remove space between pointer stars '*', as in 'int ***a;'.
sp_between_ptr_star = remove # ignore/add/remove/force/not_defined sp_between_ptr_star = remove # ignore/add/remove/force/not_defined
# Add or remove space between pointer star '*' and reference '&', as in 'int *& a;'.
sp_between_ptr_ref = ignore # ignore/add/remove/force/not_defined
# Add or remove space after pointer star '*', if followed by a word. # Add or remove space after pointer star '*', if followed by a word.
# #
# Overrides sp_type_func. # Overrides sp_type_func.
@ -313,6 +341,7 @@ sp_before_angle = ignore # ignore/add/remove/force/not_defined
sp_inside_angle = force # ignore/add/remove/force/not_defined sp_inside_angle = force # ignore/add/remove/force/not_defined
# Add or remove space inside '<>'. # Add or remove space inside '<>'.
# if empty.
sp_inside_angle_empty = ignore # ignore/add/remove/force/not_defined sp_inside_angle_empty = ignore # ignore/add/remove/force/not_defined
# Add or remove space between '>' and ':'. # Add or remove space between '>' and ':'.
@ -449,6 +478,7 @@ sp_cpp_before_struct_binding = ignore # ignore/add/remove/force/not_defined
sp_inside_square = ignore # ignore/add/remove/force/not_defined sp_inside_square = ignore # ignore/add/remove/force/not_defined
# Add or remove space inside '[]'. # Add or remove space inside '[]'.
# if empty.
sp_inside_square_empty = remove # ignore/add/remove/force/not_defined sp_inside_square_empty = remove # ignore/add/remove/force/not_defined
# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and # (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and
@ -607,6 +637,7 @@ sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined
sp_inside_braces = force # ignore/add/remove/force/not_defined sp_inside_braces = force # ignore/add/remove/force/not_defined
# Add or remove space inside '{}'. # Add or remove space inside '{}'.
# if empty.
sp_inside_braces_empty = remove # ignore/add/remove/force/not_defined sp_inside_braces_empty = remove # ignore/add/remove/force/not_defined
# Add or remove space around trailing return operator '->'. # Add or remove space around trailing return operator '->'.
@ -624,7 +655,7 @@ sp_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined
sp_func_proto_paren = remove # ignore/add/remove/force/not_defined sp_func_proto_paren = remove # ignore/add/remove/force/not_defined
# Add or remove space between function name and '()' on function declaration # Add or remove space between function name and '()' on function declaration
# without parameters. # if empty.
sp_func_proto_paren_empty = remove # ignore/add/remove/force/not_defined sp_func_proto_paren_empty = remove # ignore/add/remove/force/not_defined
# Add or remove space between function name and '(' with a typedef specifier. # Add or remove space between function name and '(' with a typedef specifier.
@ -634,7 +665,7 @@ sp_func_type_paren = ignore # ignore/add/remove/force/not_defined
sp_func_def_paren = remove # ignore/add/remove/force/not_defined sp_func_def_paren = remove # ignore/add/remove/force/not_defined
# Add or remove space between function name and '()' on function definition # Add or remove space between function name and '()' on function definition
# without parameters. # if empty.
sp_func_def_paren_empty = remove # ignore/add/remove/force/not_defined sp_func_def_paren_empty = remove # ignore/add/remove/force/not_defined
# Add or remove space inside empty function '()'. # Add or remove space inside empty function '()'.
@ -1083,6 +1114,12 @@ sp_after_noexcept = ignore # ignore/add/remove/force/not_defined
# Add or remove space after '_'. # Add or remove space after '_'.
sp_vala_after_translation = ignore # ignore/add/remove/force/not_defined sp_vala_after_translation = ignore # ignore/add/remove/force/not_defined
# Add or remove space before a bit colon ':'.
sp_before_bit_colon = force # ignore/add/remove/force/not_defined
# Add or remove space after a bit colon ':'.
sp_after_bit_colon = force # ignore/add/remove/force/not_defined
# If true, a <TAB> is inserted after #define. # If true, a <TAB> is inserted after #define.
force_tab_after_define = false # true/false force_tab_after_define = false # true/false
@ -2313,8 +2350,21 @@ nl_after_func_class_proto_group = 0 # unsigned number
nl_class_leave_one_liner_groups = false # true/false nl_class_leave_one_liner_groups = false # true/false
# The number of newlines after '}' of a multi-line function body. # The number of newlines after '}' of a multi-line function body.
#
# Overrides nl_min_after_func_body and nl_max_after_func_body.
nl_after_func_body = 3 # unsigned number nl_after_func_body = 3 # unsigned number
# The minimum number of newlines after '}' of a multi-line function body.
#
# Only works when nl_after_func_body is 0.
nl_min_after_func_body = 0 # unsigned number
# The maximum number of newlines after '}' of a multi-line function body.
#
# Only works when nl_after_func_body is 0.
# Takes precedence over nl_min_after_func_body.
nl_max_after_func_body = 0 # unsigned number
# The number of newlines after '}' of a multi-line function body in a class # The number of newlines after '}' of a multi-line function body in a class
# declaration. Also affects class constructors/destructors. # declaration. Also affects class constructors/destructors.
# #
@ -2818,6 +2868,13 @@ align_right_cmt_at_col = 1 # unsigned number
# 0: Don't align (default). # 0: Don't align (default).
align_func_proto_span = 0 # unsigned number align_func_proto_span = 0 # unsigned number
# Whether to ignore continuation lines when evaluating the number of
# new lines for the function prototype alignment's span.
#
# false: continuation lines are part of the newlines count
# true: continuation lines are not counted
align_func_proto_span_ignore_cont_lines = false # true/false
# How to consider (or treat) the '*' in the alignment of function prototypes. # How to consider (or treat) the '*' in the alignment of function prototypes.
# #
# 0: Part of the type 'void * foo();' (default) # 0: Part of the type 'void * foo();' (default)
@ -2878,6 +2935,12 @@ align_oc_msg_spec_span = 0 # unsigned number
# 3: Align with the backslash that is farthest to the right # 3: Align with the backslash that is farthest to the right
align_nl_cont = 0 # unsigned number align_nl_cont = 0 # unsigned number
# The minimum number of spaces between the end of a line and its continuation
# backslash. Requires align_nl_cont.
#
# Default: 1
align_nl_cont_spaces = 1 # unsigned number
# Whether to align macro functions and variables together. # Whether to align macro functions and variables together.
align_pp_define_together = false # true/false align_pp_define_together = false # true/false
@ -3582,6 +3645,11 @@ debug_sort_the_tracks = true # true/false
# only if the -p option is set. # only if the -p option is set.
debug_decode_the_flags = false # true/false debug_decode_the_flags = false # true/false
# use (or not) the exit(EX_SOFTWARE) function.
#
# Default: true
debug_use_the_exit_function_pop = true # true/false
# insert the number of the line at the beginning of each line # insert the number of the line at the beginning of each line
set_numbering_for_html_output = false # true/false set_numbering_for_html_output = false # true/false
@ -3637,5 +3705,5 @@ set_numbering_for_html_output = false # true/false
# `macro-close END_MESSAGE_MAP` # `macro-close END_MESSAGE_MAP`
# #
# #
# option(s) with 'not default' value: 217 # option(s) with 'not default' value: 219
# #