Skip to content

Commit

Permalink
Codacy: Error-prone Code
Browse files Browse the repository at this point in the history
Member variable 'version_info::special_separator_' is not initialized in the constructor.
  • Loading branch information
GregoryLundberg committed Oct 27, 2018
1 parent bd02a4f commit c559f9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/game_version.cpp
Expand Up @@ -49,6 +49,11 @@ version_info::version_info()
{
}

version_info::version_info(const char* str)
: version_info(std::string(str))
{
}

version_info::version_info(unsigned int major, unsigned int minor, unsigned int revision_level,
char special_separator, const std::string& special)
: nums_(3,0), special_(special), special_separator_(special_separator)
Expand Down
2 changes: 1 addition & 1 deletion src/game_version.hpp
Expand Up @@ -45,7 +45,7 @@ class version_info
public:
version_info(); /**< Default constructor. */
version_info(const std::string&); /**< String constructor. */
version_info(const char* str) : version_info(std::string(str)) {}
version_info(const char* str);

/** Simple list constructor. */
version_info(unsigned int major, unsigned int minor, unsigned int revision_level,
Expand Down

0 comments on commit c559f9f

Please sign in to comment.