Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move C++20 feature out of the header file. #262

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/ppx/command_line_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class CliOptions
public:
CliOptions() = default;

bool HasExtraOption(std::string_view option) const { return mAllOptions.contains(option); }
bool HasExtraOption(std::string_view option) const;

// Returns the number of unique options and flags that were specified on the commandline,
// not counting multiple appearances of the same flag such as: --assets-path a --assets-path b
Expand Down
5 changes: 5 additions & 0 deletions src/ppx/command_line_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ bool StartsWithDoubleDash(std::string_view s)

namespace ppx {

bool CliOptions::HasExtraOption(std::string_view option) const
{
return mAllOptions.contains(option);
}

std::pair<int, int> CliOptions::GetOptionValueOrDefault(std::string_view optionName, const std::pair<int, int>& defaultValue) const
{
auto it = mAllOptions.find(optionName);
Expand Down