Skip to content

Commit

Permalink
use const initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLee-Jones committed Jul 11, 2024
1 parent 70d0bb8 commit a08de50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libdredd/src/mutate_ast_consumer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void MutateAstConsumer::HandleTranslationUnit(clang::ASTContext& ast_context) {

if (semantics_preserving_mutation_) {
// TODO(JLJ): This should probably be moved to the prelude function.
bool rewriter_result = rewriter_.InsertTextBefore(
const bool rewriter_result = rewriter_.InsertTextBefore(
start_location_of_first_function_in_source_file,
"static thread_local unsigned long long int no_op = 0;\n\n");
(void)rewriter_result; // Keep release-mode compilers happy.
Expand Down
2 changes: 1 addition & 1 deletion src/libdredd/src/mutation_replace_binary_operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ std::string MutationReplaceBinaryOperator::GenerateMutatorFunction(
// updated.
// TODO(JLJ): The knowledge that the last char of the type of an
// assignment will always be & or * is duplicated.
std::string non_reference_type =
const std::string non_reference_type =
lhs_type.substr(0, lhs_type.size() - 1);
new_function << " " << non_reference_type
<< " arg1_original = " << arg1_evaluated << ";\n";
Expand Down

0 comments on commit a08de50

Please sign in to comment.