Skip to content

Commit

Permalink
Enable bugprone-string-integer-assignment
Browse files Browse the repository at this point in the history
Enable this clang-tidy check and fix related issues.
  • Loading branch information
jbytheway committed Aug 9, 2019
1 parent f31fcb0 commit f382c09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ performance-*,\
readability-*,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-string-integer-assignment,\
-bugprone-too-small-loop-variable,\
-bugprone-undefined-memory-manipulation,\
-bugprone-unused-return-value,\
Expand Down
6 changes: 3 additions & 3 deletions src/computer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1809,15 +1809,15 @@ void computer::print_gibberish_line()
for( int i = 0; i < length; i++ ) {
switch( rng( 0, 4 ) ) {
case 0:
gibberish += '0' + rng( 0, 9 );
gibberish += static_cast<char>( '0' + rng( 0, 9 ) );
break;
case 1:
case 2:
gibberish += 'a' + rng( 0, 25 );
gibberish += static_cast<char>( 'a' + rng( 0, 25 ) );
break;
case 3:
case 4:
gibberish += 'A' + rng( 0, 25 );
gibberish += static_cast<char>( 'A' + rng( 0, 25 ) );
break;
}
}
Expand Down

0 comments on commit f382c09

Please sign in to comment.