Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
0d40f8a9
Commit
0d40f8a9
authored
Dec 03, 2008
by
Roberto Raggi
Browse files
Added macro protection.
parent
0fcb8131
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/rpp/pp-engine.cpp
View file @
0d40f8a9
...
...
@@ -585,15 +585,19 @@ void pp::operator()(const QByteArray &source, QByteArray *result)
}
else
{
if
(
!
m
->
function_like
)
{
if
(
_dot
->
isNot
(
T_LPAREN
))
{
m
->
hidden
=
true
;
expand
(
m
->
definition
.
constBegin
(),
m
->
definition
.
constEnd
(),
result
);
m
->
hidden
=
false
;
continue
;
}
else
{
QByteArray
tmp
;
m
->
hidden
=
true
;
expand
(
m
->
definition
.
constBegin
(),
m
->
definition
.
constEnd
(),
&
tmp
);
m
->
hidden
=
false
;
m
=
0
;
// reset the active the macro
...
...
@@ -636,7 +640,9 @@ void pp::operator()(const QByteArray &source, QByteArray *result)
const
char
*
beginOfText
=
startOfToken
(
*
identifierToken
);
const
char
*
endOfText
=
endOfToken
(
*
_dot
);
++
_dot
;
// skip T_RPAREN
m
->
hidden
=
true
;
expand
(
beginOfText
,
endOfText
,
result
);
m
->
hidden
=
false
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment