mirror of
https://github.com/PerMalmberg/libcron.git
synced 2025-04-22 00:13:01 -05:00
#1 - Code formatting.
This commit is contained in:
parent
2a3b8914e5
commit
18dc065f00
@ -26,6 +26,7 @@ namespace libcron
|
||||
std::pair<int, int> limit = std::make_pair(-1, -1));
|
||||
|
||||
std::pair<int, int> day_limiter(const std::set<Months>& month);
|
||||
|
||||
int cap(int value, int lower, int upper);
|
||||
|
||||
std::regex const rand_expression{ R"#([rR]\((\d+)\-(\d+)\))#", std::regex_constants::ECMAScript };
|
||||
@ -63,8 +64,7 @@ namespace libcron
|
||||
// Remove items outside limits.
|
||||
if (limit.first != -1 && limit.second != -1)
|
||||
{
|
||||
for (auto it = numbers.begin();
|
||||
it != numbers.end();)
|
||||
for (auto it = numbers.begin(); it != numbers.end(); )
|
||||
{
|
||||
if (CronData::value_of(*it) < limit.first || CronData::value_of(*it) > limit.second)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ namespace libcron
|
||||
res &= month.first;
|
||||
|
||||
std::set<Months> month_range{};
|
||||
|
||||
if (selected_value == -1)
|
||||
{
|
||||
// Month is not specific, get the range.
|
||||
|
@ -13,7 +13,7 @@ void test(const char* const random_schedule)
|
||||
libcron::CronRandomization cr;
|
||||
std::unordered_map<int, std::unordered_map<int, int>> results{};
|
||||
|
||||
for (int i = 0; i < 10000; ++i)
|
||||
for (int i = 0; i < 50000; ++i)
|
||||
{
|
||||
auto res = cr.parse(random_schedule);
|
||||
REQUIRE(std::get<0>(res));
|
||||
|
214
uncrustify.cfg
Normal file
214
uncrustify.cfg
Normal file
@ -0,0 +1,214 @@
|
||||
# Uncrustify-0.67-87-d75a44aa9
|
||||
newlines = lf
|
||||
input_tab_size = 4
|
||||
output_tab_size = 4
|
||||
string_replace_tab_chars = true
|
||||
utf8_bom = remove
|
||||
sp_arith = force
|
||||
sp_arith_additive = force
|
||||
sp_assign = force
|
||||
sp_cpp_lambda_assign = remove
|
||||
sp_cpp_lambda_paren = remove
|
||||
sp_assign_default = force
|
||||
sp_after_assign = force
|
||||
sp_enum_paren = force
|
||||
sp_enum_assign = force
|
||||
sp_enum_before_assign = force
|
||||
sp_enum_after_assign = force
|
||||
sp_pp_stringify = remove
|
||||
sp_before_pp_stringify = remove
|
||||
sp_bool = force
|
||||
sp_compare = force
|
||||
sp_inside_paren = remove
|
||||
sp_paren_paren = remove
|
||||
sp_before_ptr_star = remove
|
||||
sp_before_unnamed_ptr_star = remove
|
||||
sp_between_ptr_star = remove
|
||||
sp_after_ptr_star = force
|
||||
sp_after_ptr_block_caret = remove
|
||||
sp_after_ptr_star_qualifier = force
|
||||
sp_after_ptr_star_func = force
|
||||
sp_ptr_star_paren = force
|
||||
sp_before_ptr_star_func = force
|
||||
sp_before_byref = remove
|
||||
sp_before_unnamed_byref = remove
|
||||
sp_after_byref = force
|
||||
sp_after_byref_func = force
|
||||
sp_before_byref_func = force
|
||||
sp_before_angle = remove
|
||||
sp_inside_angle = remove
|
||||
sp_angle_colon = force
|
||||
sp_after_angle = force
|
||||
sp_angle_paren_empty = remove
|
||||
sp_angle_word = force
|
||||
sp_angle_shift = remove
|
||||
sp_permit_cpp11_shift = true
|
||||
sp_before_sparen = force
|
||||
sp_inside_sparen = remove
|
||||
sp_inside_sparen_close = remove
|
||||
sp_inside_sparen_open = remove
|
||||
sp_after_sparen = force
|
||||
sp_sparen_brace = force
|
||||
sp_special_semi = remove
|
||||
sp_before_semi_for = remove
|
||||
sp_before_semi_for_empty = remove
|
||||
sp_after_semi = remove
|
||||
sp_after_semi_for_empty = force
|
||||
sp_after_comma = force
|
||||
sp_before_ellipsis = remove
|
||||
sp_after_class_colon = force
|
||||
sp_before_class_colon = force
|
||||
sp_after_constr_colon = force
|
||||
sp_before_constr_colon = force
|
||||
sp_after_operator = remove
|
||||
sp_after_operator_sym = remove
|
||||
sp_after_cast = remove
|
||||
sp_inside_paren_cast = remove
|
||||
sp_cpp_cast_paren = remove
|
||||
sp_sizeof_paren = remove
|
||||
sp_inside_braces_enum = force
|
||||
sp_inside_braces_struct = force
|
||||
sp_after_type_brace_init_lst_open = force
|
||||
sp_before_type_brace_init_lst_close = force
|
||||
sp_inside_type_brace_init_lst = force
|
||||
sp_inside_braces_empty = remove
|
||||
sp_type_func = force
|
||||
sp_type_brace_init_lst = remove
|
||||
sp_func_proto_paren = remove
|
||||
sp_func_proto_paren_empty = remove
|
||||
sp_func_def_paren = remove
|
||||
sp_inside_tparen = remove
|
||||
sp_after_tparen_close = remove
|
||||
sp_square_fparen = remove
|
||||
sp_fparen_brace = force
|
||||
sp_fparen_dbrace = force
|
||||
sp_func_call_paren = remove
|
||||
sp_func_class_paren_empty = remove
|
||||
sp_return_paren = remove
|
||||
sp_attribute_paren = remove
|
||||
sp_defined_paren = remove
|
||||
sp_throw_paren = remove
|
||||
sp_after_throw = force
|
||||
sp_catch_paren = force
|
||||
sp_oc_catch_paren = force
|
||||
sp_else_brace = force
|
||||
sp_brace_else = force
|
||||
sp_before_dc = remove
|
||||
sp_after_dc = remove
|
||||
sp_before_nl_cont = force
|
||||
sp_cond_question = force
|
||||
sp_after_new = force
|
||||
sp_between_new_paren = remove
|
||||
sp_inside_newop_paren = force
|
||||
sp_inside_newop_paren_open = remove
|
||||
sp_inside_newop_paren_close = remove
|
||||
indent_columns = 4
|
||||
indent_with_tabs = 0
|
||||
indent_align_string = true
|
||||
indent_namespace = true
|
||||
indent_namespace_level = 4
|
||||
indent_class = true
|
||||
indent_constr_colon = true
|
||||
indent_ctor_init = 4
|
||||
indent_access_spec = 0
|
||||
indent_access_spec_body = true
|
||||
indent_cpp_lambda_body = true
|
||||
indent_cpp_lambda_only_once = true
|
||||
nl_assign_leave_one_liners = true
|
||||
nl_class_leave_one_liners = true
|
||||
nl_enum_leave_one_liners = true
|
||||
nl_getset_leave_one_liners = true
|
||||
nl_func_leave_one_liners = true
|
||||
nl_cpp_lambda_leave_one_liners = true
|
||||
nl_start_of_file = remove
|
||||
nl_end_of_file = force
|
||||
nl_end_of_file_min = 1
|
||||
nl_enum_brace = force
|
||||
nl_enum_class = remove
|
||||
nl_enum_class_identifier = remove
|
||||
nl_if_brace = force
|
||||
nl_brace_else = force
|
||||
nl_elseif_brace = force
|
||||
nl_else_brace = force
|
||||
nl_else_if = remove
|
||||
nl_before_if_closing_paren = remove
|
||||
nl_brace_finally = force
|
||||
nl_finally_brace = force
|
||||
nl_try_brace = force
|
||||
nl_for_brace = force
|
||||
nl_catch_brace = force
|
||||
nl_while_brace = force
|
||||
nl_do_brace = force
|
||||
nl_brace_while = force
|
||||
nl_enum_own_lines = force
|
||||
nl_func_type_name = remove
|
||||
nl_func_decl_empty = remove
|
||||
nl_func_def_empty = remove
|
||||
nl_func_call_empty = remove
|
||||
nl_return_expr = remove
|
||||
nl_after_semicolon = true
|
||||
nl_after_brace_close = true
|
||||
nl_before_if = force
|
||||
nl_after_if = force
|
||||
nl_before_for = force
|
||||
nl_after_for = force
|
||||
nl_before_while = force
|
||||
nl_after_while = force
|
||||
nl_before_switch = force
|
||||
nl_after_switch = force
|
||||
nl_before_synchronized = force
|
||||
nl_after_synchronized = force
|
||||
nl_before_do = force
|
||||
nl_after_do = force
|
||||
nl_max = 2
|
||||
nl_after_func_proto = 2
|
||||
nl_after_func_proto_group = 2
|
||||
nl_after_func_class_proto = 2
|
||||
nl_after_func_class_proto_group = 2
|
||||
nl_before_func_body_def = 2
|
||||
nl_before_func_body_proto = 2
|
||||
nl_after_func_body = 2
|
||||
nl_after_func_body_class = 2
|
||||
nl_after_func_body_one_liner = 1
|
||||
nl_before_block_comment = 2
|
||||
nl_before_c_comment = 2
|
||||
nl_before_cpp_comment = 2
|
||||
nl_after_multiline_comment = true
|
||||
nl_after_label_colon = true
|
||||
nl_after_struct = 2
|
||||
nl_before_class = 2
|
||||
nl_after_class = 2
|
||||
nl_before_access_spec = 1
|
||||
nl_after_access_spec = 1
|
||||
nl_comment_func_def = 1
|
||||
nl_after_try_catch_finally = 2
|
||||
nl_around_cs_property = 2
|
||||
nl_between_get_set = 2
|
||||
eat_blanks_after_open_brace = true
|
||||
eat_blanks_before_close_brace = true
|
||||
nl_before_return = true
|
||||
pos_arith = lead
|
||||
code_width = 120
|
||||
ls_for_split_full = true
|
||||
ls_func_split_full = true
|
||||
cmt_width = 120
|
||||
cmt_reflow_mode = 2
|
||||
cmt_indent_multi = false
|
||||
cmt_c_group = true
|
||||
cmt_sp_after_star_cont = 1
|
||||
mod_full_brace_do = force
|
||||
mod_full_brace_for = force
|
||||
mod_full_brace_function = force
|
||||
mod_full_brace_if = force
|
||||
mod_full_brace_nl_block_rem_mlcond = true
|
||||
mod_full_brace_while = force
|
||||
mod_full_brace_using = force
|
||||
mod_paren_on_return = remove
|
||||
mod_remove_extra_semicolon = true
|
||||
mod_sort_using = true
|
||||
mod_case_brace = force
|
||||
mod_remove_empty_return = true
|
||||
pp_ignore_define_body = true
|
||||
use_indent_func_call_param = false
|
||||
# option(s) with 'not default' value: 209
|
||||
#
|
Loading…
x
Reference in New Issue
Block a user