Skip to content

Commit f90f7de

Browse files
committed
[main] uncrustify: set indent_align_assign=false and re-uncrustify
1 parent 281ae87 commit f90f7de

File tree

12 files changed

+29
-29
lines changed

12 files changed

+29
-29
lines changed

.uncrustify.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ indent_comma_paren=false
4848
indent_bool_paren=false
4949
indent_square_nl=false
5050
indent_preserve_sql=false
51-
indent_align_assign=true
51+
indent_align_assign=false
5252
sp_balance_nested_parens=false
5353
align_keep_tabs=false
5454
align_with_tabs=false

experiments/issue269/rng-microbenchmark/old_rng.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void OldRandomNumberGenerator::seed(unsigned int *init_key, int key_length) {
5858
seed(19650218UL);
5959
for (; k; --k) {
6060
mt[i] = (mt[i] ^ ((mt[i - 1] ^ (mt[i - 1] >> 30)) * 1664525UL)) +
61-
init_key[j] + j;
61+
init_key[j] + j;
6262
mt[i] &= 0xffffffffUL;
6363
++i;
6464
++j;

src/search/cegar/abstract_search.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ AbstractState *AbstractSearch::astar_search(
7373
return state;
7474
}
7575
const Transitions &transitions = forward ?
76-
state->get_outgoing_transitions() :
77-
state->get_incoming_transitions();
76+
state->get_outgoing_transitions() :
77+
state->get_incoming_transitions();
7878
for (const Transition &transition : transitions) {
7979
int op_id = transition.op_id;
8080
AbstractState *successor = transition.target;

src/search/heuristics/cea_heuristic.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ LocalProblem *ContextEnhancedAdditiveHeuristic::build_problem_for_variable(
153153
LocalProblemNode &target = problem->nodes[target_value];
154154
for (const ValueTransitionLabel &label : dtg_trans.labels) {
155155
OperatorProxy op = label.is_axiom ?
156-
task_proxy.get_axioms()[label.op_id] :
157-
task_proxy.get_operators()[label.op_id];
156+
task_proxy.get_axioms()[label.op_id] :
157+
task_proxy.get_operators()[label.op_id];
158158
LocalTransition trans(&node, &target, &label, op.get_cost());
159159
node.outgoing_transitions.push_back(trans);
160160
}
@@ -365,8 +365,8 @@ void ContextEnhancedAdditiveHeuristic::mark_helpful_transitions(
365365
// Transition possibly applicable.
366366
const ValueTransitionLabel &label = *first_on_path->label;
367367
OperatorProxy op = label.is_axiom ?
368-
task_proxy.get_axioms()[label.op_id] :
369-
task_proxy.get_operators()[label.op_id];
368+
task_proxy.get_axioms()[label.op_id] :
369+
task_proxy.get_operators()[label.op_id];
370370
if (min_action_cost != 0 || task_properties::is_applicable(op, state)) {
371371
// If there are no zero-cost actions, the target_cost/
372372
// action_cost test above already guarantees applicability.

src/search/heuristics/cg_heuristic.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ int CGHeuristic::get_transition_cost(const State &state,
150150
// Scan labels of the transition.
151151
for (ValueTransitionLabel &label : transition.labels) {
152152
OperatorProxy op = label.is_axiom ?
153-
task_proxy.get_axioms()[label.op_id] :
154-
task_proxy.get_operators()[label.op_id];
153+
task_proxy.get_axioms()[label.op_id] :
154+
task_proxy.get_operators()[label.op_id];
155155
int new_distance = source_distance + op.get_cost();
156156
for (LocalAssignment &assignment : label.precond) {
157157
if (new_distance >= *target_distance_ptr)
@@ -268,8 +268,8 @@ void CGHeuristic::mark_helpful_transitions(const State &state,
268268
}
269269

270270
OperatorProxy op = helpful->is_axiom ?
271-
task_proxy.get_axioms()[helpful->op_id] :
272-
task_proxy.get_operators()[helpful->op_id];
271+
task_proxy.get_axioms()[helpful->op_id] :
272+
task_proxy.get_operators()[helpful->op_id];
273273
if (cost == op.get_cost() &&
274274
!op.is_axiom() &&
275275
task_properties::is_applicable(op, state)) {

src/search/landmarks/exploration.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void Exploration::relaxed_exploration(bool use_h_max, bool level_out) {
228228
assert(unary_op->unsatisfied_preconditions >= 0);
229229
if (unary_op->unsatisfied_preconditions == 0) {
230230
int depth = unary_op->is_induced_by_axiom(task_proxy)
231-
? unary_op->depth : unary_op->depth + 1;
231+
? unary_op->depth : unary_op->depth + 1;
232232
if (use_h_max)
233233
enqueue_if_necessary(unary_op->effect, unary_op->h_max_cost,
234234
depth, unary_op, use_h_max);

src/search/merge_and_shrink/merge_scoring_function_miasm.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ vector<double> MergeScoringFunctionMIASM::compute_scores(
6262
*/
6363
assert(num_states);
6464
double score = static_cast<double>(alive_states_count) /
65-
static_cast<double>(num_states);
65+
static_cast<double>(num_states);
6666
scores.push_back(score);
6767
}
6868
return scores;

src/search/options/plugin.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ class Plugin {
5656
Registry<T *>::instance()->insert(key, factory);
5757
// See comment in PluginShared.
5858
DocFactory doc_factory = [factory](OptionParser &parser) {
59-
factory(parser);
60-
};
59+
factory(parser);
60+
};
6161
PluginTypeNameGetter type_name_factory = [&]() {
62-
return TypeNamer<T *>::name();
63-
};
62+
return TypeNamer<T *>::name();
63+
};
6464
DocStore::instance()->register_plugin(key, doc_factory, type_name_factory, group);
6565
}
6666
~Plugin() = default;
@@ -85,11 +85,11 @@ class PluginShared {
8585
call them later, after all PluginType objects have been constructed.
8686
*/
8787
DocFactory doc_factory = [factory](OptionParser &parser) {
88-
factory(parser);
89-
};
88+
factory(parser);
89+
};
9090
PluginTypeNameGetter type_name_factory = [&]() {
91-
return TypeNamer<TPtr>::name();
92-
};
91+
return TypeNamer<TPtr>::name();
92+
};
9393
DocStore::instance()->register_plugin(key, doc_factory, type_name_factory, group);
9494
}
9595
~PluginShared() = default;

src/search/pdbs/pattern_collection_generator_genetic.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void PatternCollectionGeneratorGenetic::select(
5757
// Find first entry which is strictly greater than random.
5858
selected = upper_bound(cumulative_fitness.begin(),
5959
cumulative_fitness.end(), random) -
60-
cumulative_fitness.begin();
60+
cumulative_fitness.begin();
6161
}
6262
new_pattern_collections.push_back(pattern_collections[selected]);
6363
}

src/search/search_engines/enforced_hill_climbing_search.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ EnforcedHillClimbingSearch::EnforcedHillClimbingSearch(
8181
}
8282
use_preferred = find(preferred_operator_evaluators.begin(),
8383
preferred_operator_evaluators.end(), evaluator) !=
84-
preferred_operator_evaluators.end();
84+
preferred_operator_evaluators.end();
8585

8686
open_list = create_ehc_open_list_factory(
8787
use_preferred, preferred_usage)->create_edge_open_list();
@@ -163,7 +163,7 @@ void EnforcedHillClimbingSearch::expand(EvaluationContext &eval_context) {
163163
eval_context.get_state(), successor_operators);
164164
for (OperatorID op_id : successor_operators) {
165165
bool preferred = use_preferred &&
166-
preferred_operators.contains(op_id);
166+
preferred_operators.contains(op_id);
167167
insert_successor_into_open_list(
168168
eval_context, node_g, op_id, preferred);
169169
}
@@ -197,7 +197,7 @@ SearchStatus EnforcedHillClimbingSearch::ehc() {
197197

198198
// d: distance from initial node in this EHC phase
199199
int d = parent_node.get_g() - current_phase_start_g +
200-
get_adjusted_cost(last_op);
200+
get_adjusted_cost(last_op);
201201

202202
if (parent_node.get_real_g() + last_op.get_cost() >= bound)
203203
continue;

src/search/search_engines/lazy_search.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ SearchStatus LazySearch::step() {
155155

156156
SearchNode node = search_space.get_node(current_state);
157157
bool reopen = reopen_closed_nodes && !node.is_new() &&
158-
!node.is_dead_end() && (current_g < node.get_g());
158+
!node.is_dead_end() && (current_g < node.get_g());
159159

160160
if (node.is_new() || reopen) {
161161
if (current_operator_id != OperatorID::no_operator) {

src/search/task_utils/sampling.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ std::vector<State> sample_states_with_random_walks(
3939
double average_operator_cost,
4040
utils::RandomNumberGenerator &rng,
4141
std::function<bool(State)> is_dead_end = [] (const State &) {
42-
return false;
43-
},
42+
return false;
43+
},
4444
const utils::CountdownTimer *timer = nullptr);
4545
}
4646

0 commit comments

Comments
 (0)