summaryrefslogtreecommitdiffstats
path: root/security/nss/nss-tool/common/argparse.cc
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-28 07:38:20 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-28 07:38:20 +0200
commit6b2bba06b433fb75979ab6daf7bbe8bc76c53875 (patch)
tree75803b4683889e6e0d2a3faef30415db3ff7b3ba /security/nss/nss-tool/common/argparse.cc
parent72def35cd0cf3649b6d7ab72b66117df3e1c33fc (diff)
parentc75dae3ed21bfa5a8ae46cd83d18329af5bea05a (diff)
downloadUXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.gz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.lz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.xz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into pm_url_1
Diffstat (limited to 'security/nss/nss-tool/common/argparse.cc')
-rw-r--r--security/nss/nss-tool/common/argparse.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/security/nss/nss-tool/common/argparse.cc b/security/nss/nss-tool/common/argparse.cc
deleted file mode 100644
index 3b7c73891..000000000
--- a/security/nss/nss-tool/common/argparse.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "argparse.h"
-
-ArgParser::ArgParser(const std::vector<std::string>& arguments) {
- for (size_t i = 0; i < arguments.size(); i++) {
- std::string arg = arguments.at(i);
- if (arg.find("--") == 0) {
- // look for an option argument
- if (i + 1 < arguments.size() && arguments.at(i + 1).find("--") != 0) {
- programArgs_[arg] = arguments.at(i + 1);
- i++;
- } else {
- programArgs_[arg] = "";
- }
- } else {
- // positional argument (e.g. required argument)
- positionalArgs_.push_back(arg);
- }
- }
-}