Skip to content

Commit

Permalink
Misc cleanup - newline at eof, no manual id load
Browse files Browse the repository at this point in the history
It's incorrect to manually load the "id" member - generic factory will
handle that for us.

At a newline at the end of a file, because it makes git happy.
  • Loading branch information
anothersimulacrum committed Feb 21, 2022
1 parent 51e44ef commit de31727
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/butchery_requirements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ bool butchery_requirements::is_valid() const

void butchery_requirements::load( const JsonObject &jo, const std::string & )
{
mandatory( jo, was_loaded, "id", id );

for( const JsonMember member : jo.get_object( "requirements" ) ) {
float modifier = std::stof( member.name() );
requirements.emplace( modifier, std::map<creature_size, std::map<butcher_type, requirement_id>> {} );
Expand Down
2 changes: 1 addition & 1 deletion src/character_modifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ struct character_modifier {
friend class generic_factory<character_modifier>;
};

#endif // CATA_SRC_CHARACTER_MODIFIER_H
#endif // CATA_SRC_CHARACTER_MODIFIER_H

0 comments on commit de31727

Please sign in to comment.