Skip to content

Commit

Permalink
Merge pull request #78385 from CleverRaven/build-fixies
Browse files Browse the repository at this point in the history
Build fixies
  • Loading branch information
Night-Pryanik authored Dec 8, 2024
2 parents c5cf777 + 163fe69 commit 44180c3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 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
1 change: 0 additions & 1 deletion src/talker.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ class talker: virtual public const_talker
virtual computer *get_computer() {
return nullptr;
}
virtual void set_pos( tripoint ) {}
virtual void set_pos( tripoint_bub_ms ) {}
virtual void update_missions( const std::vector<mission *> & ) {}
virtual void set_str_max( int ) {}
Expand Down
10 changes: 5 additions & 5 deletions src/talker_character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ tripoint_abs_omt talker_character_const::global_omt_location() const
return me_chr_const->global_omt_location();
}

void talker_character::set_pos( tripoint new_pos )
{
me_chr->setpos( new_pos );
}

int talker_character_const::get_cur_hp( const bodypart_id &bp ) const
{
return me_chr_const->get_hp( bp );
Expand Down Expand Up @@ -135,6 +130,11 @@ dealt_damage_instance talker_character_const::deal_damage( Creature *source, bod
return source->deal_damage( source, bp, dam );
}

void talker_character::set_pos( tripoint_bub_ms new_pos )
{
me_chr->setpos( new_pos );
}

void talker_character::set_str_max( int value )
{
me_chr->str_max = value;
Expand Down
2 changes: 1 addition & 1 deletion src/talker_character.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class talker_character: virtual public talker
return me_chr;
}

void set_pos( tripoint new_pos ) override;
void set_pos( tripoint_bub_ms new_pos ) override;

// stats, skills, traits, bionics, and magic
void set_str_max( int value ) override;
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 44180c3

Please sign in to comment.