mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-09 00:50:09 +08:00
Cleanup & indent .h files
This commit is contained in:
@@ -26,34 +26,44 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace TCLAP {
|
||||
namespace TCLAP
|
||||
{
|
||||
|
||||
class OptionalUnlabeledTracker
|
||||
{
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
static void check( bool req, const std::string& argName );
|
||||
static void check( bool req, const std::string& argName );
|
||||
|
||||
static void gotOptional() { alreadyOptionalRef() = true; }
|
||||
static void gotOptional()
|
||||
{
|
||||
alreadyOptionalRef() = true;
|
||||
}
|
||||
|
||||
static bool& alreadyOptional() { return alreadyOptionalRef(); }
|
||||
static bool& alreadyOptional()
|
||||
{
|
||||
return alreadyOptionalRef();
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
static bool& alreadyOptionalRef() { static bool ct = false; return ct; }
|
||||
static bool& alreadyOptionalRef()
|
||||
{
|
||||
static bool ct = false;
|
||||
return ct;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName )
|
||||
{
|
||||
if ( OptionalUnlabeledTracker::alreadyOptional() )
|
||||
throw( SpecificationException(
|
||||
"You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg",
|
||||
argName ) );
|
||||
|
||||
if ( !req )
|
||||
OptionalUnlabeledTracker::gotOptional();
|
||||
if ( OptionalUnlabeledTracker::alreadyOptional() )
|
||||
throw( SpecificationException(
|
||||
"You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg",
|
||||
argName ) );
|
||||
if ( !req )
|
||||
OptionalUnlabeledTracker::gotOptional();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user