Skip to content

Commit

Permalink
Silence some clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Dec 7, 2024
1 parent 1467dc6 commit 163fe69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/scores_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void scores_ui_impl::init_data()
const std::string &symbol = m.sym;
nc_color color = m.color;
const std::string &name = m.nname();
monster_kills_data.emplace_back( std::make_tuple( num_kills, symbol, color, name ) );
monster_kills_data.emplace_back( num_kills, symbol, color, name );
}
auto sort_by_count_then_name = []( auto & a, auto & b ) {
return
Expand Down
10 changes: 5 additions & 5 deletions src/worldfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ bool WORLD::save( const bool is_conversion ) const
}

if( !is_conversion ) {
const auto savefile = folder_path() / PATH_INFO::worldoptions();
const cata_path savefile = folder_path() / PATH_INFO::worldoptions();
const bool saved = write_to_file( savefile, [&]( std::ostream & fout ) {
JsonOut jout( fout );

Expand Down Expand Up @@ -423,7 +423,7 @@ void worldfactory::init()
if( newworld->save( true ) ) {
const cata_path origin_path = old_world.folder_path();
// move files from origin_path into new world path
for( auto &origin_file : get_files_from_path( ".", origin_path, false ) ) {
for( cata_path &origin_file : get_files_from_path( ".", origin_path, false ) ) {
std::string filename = origin_file.get_relative_path().filename().generic_u8string();

if( rename_file( origin_file, ( newworld->folder_path() / filename ) ) ) {
Expand Down Expand Up @@ -2153,15 +2153,15 @@ void worldfactory::delete_world( const std::string &worldname, const bool delete
auto end = std::remove_if( file_paths.begin(), file_paths.end(), isForbidden );
file_paths.erase( end, file_paths.end() );

for( auto &file_path : file_paths ) {
for( cata_path &file_path : file_paths ) {
fs::path folder_path = file_path.get_unrelative_path().parent_path();
while( folder_path.filename() != worldname ) {
while( folder_path.filename() != fs::u8path( worldname ) ) {
directory_paths.insert( folder_path );
folder_path = folder_path.parent_path();
}
}

for( auto &file : file_paths ) {
for( cata_path &file : file_paths ) {
remove_file( file );
}

Expand Down

0 comments on commit 163fe69

Please sign in to comment.