Skip to content

Commit

Permalink
Get rid of compiler warnings (#75228)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikLundell authored Jul 25, 2024
1 parent 75f28b3 commit 560f245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3307,7 +3307,7 @@ void Item_factory::load( islot_comestible &slot, const JsonObject &jo, const std

for( const JsonObject jsobj : jo.get_array( "contamination" ) ) {
slot.contamination.emplace( diseasetype_id( jsobj.get_string( "disease" ) ),
jsobj.get_float( "probability" ) );
static_cast<float>( jsobj.get_float( "probability" ) ) );
}

if( jo.has_member( "primary_material" ) ) {
Expand Down
4 changes: 2 additions & 2 deletions src/math_parser_diag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,8 @@ std::function<double( dialogue & )> energy_eval( char /* scope */,
{

return [val = params[0]]( dialogue const & d ) {
return units::to_millijoule(
_read_from_string<units::energy>( val.str( d ), units::energy_units ) );
return static_cast<double>( units::to_millijoule(
_read_from_string<units::energy>( val.str( d ), units::energy_units ) ) );
};
}

Expand Down

0 comments on commit 560f245

Please sign in to comment.