Skip to content

Commit

Permalink
[MISC] Apply second review
Browse files Browse the repository at this point in the history
Signed-off-by: Lydia Buntrock <[email protected]>
  • Loading branch information
Irallia committed Jan 19, 2022
1 parent a6e904f commit 915bddf
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions include/sharg/validators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,23 +602,12 @@ class output_file_validator : public file_validator_base
output_file_validator & operator=(output_file_validator &&) = default; //!< Defaulted.
virtual ~output_file_validator() = default; //!< Virtual Destructor.

/*!\brief Constructs from a given overwrite mode.
* \param[in] mode A sharg::output_file_open_options indicating whether the validator throws if a file already
exists.
*/
explicit output_file_validator(output_file_open_options const mode)
: file_validator_base{}, mode{mode}
{
file_validator_base::extensions = std::move(std::vector<std::string> {});
file_validator_base::extensions_str = std::string {};
}

/*!\brief Constructs from a given overwrite mode and a list of valid extensions.
* \param[in] mode A sharg::output_file_open_options indicating whether the validator throws if a file already
exists.
* \param[in] extensions The valid extensions to validate for.
*/
explicit output_file_validator(output_file_open_options const mode, std::vector<std::string> extensions)
explicit output_file_validator(output_file_open_options const mode, std::vector<std::string> extensions = {})
: file_validator_base{}, mode{mode}
{
file_validator_base::extensions = std::move(extensions);
Expand Down

0 comments on commit 915bddf

Please sign in to comment.