Skip to content

Commit aa06d0b

Browse files
committed
astutils.cpp: fixed -Wtype-limits GCC warning in NONNEG build
``` lib/astutils.cpp:115:23: error: comparison of unsigned expression in ‘< 0’ is always false [-Werror=type-limits] 115 | if (!tok || depth < 0) | ~~~~~~^~~ ```
1 parent eadba4e commit aa06d0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/astutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static int getArgumentPos(const Token* ftok, const Token* tokToFind){
109109
}
110110

111111
template<class T, class OuputIterator, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
112-
static void astFlattenCopy(T* tok, const char* op, OuputIterator out, nonneg int depth = 100)
112+
static void astFlattenCopy(T* tok, const char* op, OuputIterator out, int depth = 100)
113113
{
114114
--depth;
115115
if (!tok || depth < 0)

0 commit comments

Comments
 (0)