-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2120 from diffblue/optional_optnr
use optional<size_t> instead of stupid -1
- Loading branch information
Showing
4 changed files
with
82 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ Author: Daniel Kroening, [email protected] | |
#include <list> | ||
#include <string> | ||
|
||
#include "optional.h" | ||
|
||
class cmdlinet | ||
{ | ||
public: | ||
|
@@ -53,13 +55,13 @@ class cmdlinet | |
hasval(false), | ||
islong(false), | ||
optchar(0) | ||
{} | ||
{} | ||
}; | ||
|
||
std::vector<optiont> options; | ||
|
||
int getoptnr(char option) const; | ||
int getoptnr(const std::string &option) const; | ||
optionalt<std::size_t> getoptnr(char option) const; | ||
optionalt<std::size_t> getoptnr(const std::string &option) const; | ||
}; | ||
|
||
#endif // CPROVER_UTIL_CMDLINE_H |