aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor C. Richberger <Taywee@gmx.com>2016-05-08 21:43:28 -0600
committerTaylor C. Richberger <Taywee@gmx.com>2016-05-08 21:43:28 -0600
commitab7cdaadfb77bad1af5c3789474857edb45f5d60 (patch)
treee966719381ce43cd868137d81f45eec1c00aa34f
parentchange README syntax (diff)
downloadargs.hxx-ab7cdaadfb77bad1af5c3789474857edb45f5d60.tar.xz
small improvement
-rw-r--r--args.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/args.hxx b/args.hxx
index 7be47af..6b088b5 100644
--- a/args.hxx
+++ b/args.hxx
@@ -981,10 +981,10 @@ namespace args
ArgFlagBase *argbase = dynamic_cast<ArgFlagBase *>(base);
if (argbase)
{
- argchunk.erase(std::begin(argchunk), ++argit);
- if (!argchunk.empty())
+ const std::string arg(++argit, std::end(argchunk));
+ if (!arg.empty())
{
- argbase->ParseArg(argchunk);
+ argbase->ParseArg(arg);
} else
{
++it;