Refactoring: Convert enum Direction to enum class
This commit is contained in:
parent
7eaa49fd5b
commit
29596baa92
|
@ -248,7 +248,7 @@ public:
|
|||
optional(false),
|
||||
variadic(false),
|
||||
iteratorInfo(),
|
||||
direction(DIR_UNKNOWN) {
|
||||
direction(Direction::DIR_UNKNOWN) {
|
||||
}
|
||||
|
||||
bool notbool;
|
||||
|
@ -282,7 +282,7 @@ public:
|
|||
};
|
||||
std::vector<MinSize> minsizes;
|
||||
|
||||
enum Direction {
|
||||
enum class Direction {
|
||||
DIR_IN, ///< Input to called function. Data is treated as read-only.
|
||||
DIR_OUT, ///< Output to caller. Data is passed by reference or address and is potentially written.
|
||||
DIR_INOUT, ///< Input to called function, and output to caller. Data is passed by reference or address and is potentially modified.
|
||||
|
|
|
@ -294,10 +294,10 @@ private:
|
|||
tokenList.createTokens(istr);
|
||||
tokenList.front()->next()->astOperand1(tokenList.front());
|
||||
|
||||
ASSERT_EQUALS(Library::ArgumentChecks::Direction::DIR_IN, library.getArgDirection(tokenList.front(), 1));
|
||||
ASSERT_EQUALS(Library::ArgumentChecks::Direction::DIR_OUT, library.getArgDirection(tokenList.front(), 2));
|
||||
ASSERT_EQUALS(Library::ArgumentChecks::Direction::DIR_INOUT, library.getArgDirection(tokenList.front(), 3));
|
||||
ASSERT_EQUALS(Library::ArgumentChecks::Direction::DIR_UNKNOWN, library.getArgDirection(tokenList.front(), 4));
|
||||
ASSERT(Library::ArgumentChecks::Direction::DIR_IN == library.getArgDirection(tokenList.front(), 1));
|
||||
ASSERT(Library::ArgumentChecks::Direction::DIR_OUT == library.getArgDirection(tokenList.front(), 2));
|
||||
ASSERT(Library::ArgumentChecks::Direction::DIR_INOUT == library.getArgDirection(tokenList.front(), 3));
|
||||
ASSERT(Library::ArgumentChecks::Direction::DIR_UNKNOWN == library.getArgDirection(tokenList.front(), 4));
|
||||
}
|
||||
|
||||
void function_arg_valid() const {
|
||||
|
|
Loading…
Reference in New Issue