diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-06-02 08:55:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 06:55:24 +0000 |
commit | 4dacf3183d6790ebb4615263908da294e43e3cb6 (patch) | |
tree | 2b2b191c3bc5ad3bfd9967d83e22b1158aed4930 /src/options/options_template.cpp | |
parent | 444487219984b510bfe8c95c25fd8d28466551d5 (diff) |
Make `Options::assign()` specializations free functions (#6648)
This PR removes the next two heavily specialized template functions. Both Options::assign() and Options::assignBool() are only used within options.cpp now and there is thus no reason to keep them in the public interface. Furthermore, we can just make them properly named functions instead of template functions.
Diffstat (limited to 'src/options/options_template.cpp')
-rw-r--r-- | src/options/options_template.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index 091acfd7a..251072ba5 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -416,7 +416,7 @@ void Options::parseOptionsRecursive(int argc, char* argv[], std::vector<std::string>* nonoptions) { - + Options& opts = *this; if(Debug.isOn("options")) { Debug("options") << "starting a new parseOptionsRecursive with " << argc << " arguments" << std::endl; @@ -553,6 +553,7 @@ void Options::setOptionInternal(const std::string& key, const std::string& optionarg) { options::OptionsHandler* handler = d_handler; + Options& opts = *this; ${setoption_handlers}$ throw UnrecognizedOptionException(key); } |