summaryrefslogtreecommitdiffstats
path: root/arg_parser.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:46:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:46:42 +0000
commite74d15e54c99ce6d8210d28d68732ec61e924c72 (patch)
treeff66615c35389f6a1cbe1e0293bab664e0944219 /arg_parser.cc
parentReleasing debian version 1.21-8. (diff)
downloadlzip-e74d15e54c99ce6d8210d28d68732ec61e924c72.tar.xz
lzip-e74d15e54c99ce6d8210d28d68732ec61e924c72.zip
Merging upstream version 1.22.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arg_parser.cc')
-rw-r--r--arg_parser.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/arg_parser.cc b/arg_parser.cc
index ea32fde..2e40a13 100644
--- a/arg_parser.cc
+++ b/arg_parser.cc
@@ -1,20 +1,20 @@
-/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
- Copyright (C) 2006-2019 Antonio Diaz Diaz.
+/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
+ Copyright (C) 2006-2021 Antonio Diaz Diaz.
- This library is free software. Redistribution and use in source and
- binary forms, with or without modification, are permitted provided
- that the following conditions are met:
+ This library is free software. Redistribution and use in source and
+ binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions, and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <cstring>
@@ -167,7 +167,7 @@ Arg_parser::Arg_parser( const int argc, const char * const argv[],
else non_options.push_back( argv[argind++] );
}
}
- if( error_.size() ) data.clear();
+ if( !error_.empty() ) data.clear();
else
{
for( unsigned i = 0; i < non_options.size(); ++i )
@@ -190,7 +190,7 @@ Arg_parser::Arg_parser( const char * const opt, const char * const arg,
{ if( opt[2] ) parse_long_option( opt, arg, options, argind ); }
else
parse_short_option( opt, arg, options, argind );
- if( error_.size() ) data.clear();
+ if( !error_.empty() ) data.clear();
}
else data.push_back( Record( opt ) );
}