Skip to content
GitLab
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
2a8327e5
Commit
2a8327e5
authored
Mar 03, 2009
by
Roberto Raggi
Browse files
Obsoleted code.
parent
ba200c78
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/pp-engine.cpp
View file @
2a8327e5
...
...
@@ -492,24 +492,6 @@ QByteArray Preprocessor::operator()(const QByteArray &filename,
return
preprocessed
;
}
QByteArray
Preprocessor
::
operator
()(
const
QByteArray
&
source
)
{
QByteArray
preprocessed
;
preprocess
(
source
,
&
preprocessed
);
return
preprocessed
;
}
void
Preprocessor
::
preprocess
(
const
QByteArray
&
filename
,
const
QByteArray
&
source
,
QByteArray
*
result
)
{
const
QByteArray
previousFile
=
env
.
currentFile
;
env
.
currentFile
=
filename
;
preprocess
(
source
,
result
);
env
.
currentFile
=
previousFile
;
}
void
Preprocessor
::
expand
(
const
QByteArray
&
source
,
QByteArray
*
result
)
{
_expand
(
source
,
result
);
...
...
@@ -536,13 +518,17 @@ Preprocessor::State Preprocessor::createStateFromSource(const QByteArray &source
return
state
;
}
void
Preprocessor
::
preprocess
(
const
QByteArray
&
source
,
QByteArray
*
result
)
void
Preprocessor
::
preprocess
(
const
QByteArray
&
fileName
,
const
QByteArray
&
source
,
QByteArray
*
result
)
{
QByteArray
*
previousResult
=
_result
;
_result
=
result
;
pushState
(
createStateFromSource
(
source
));
const
QByteArray
previousFileName
=
env
.
currentFile
;
env
.
currentFile
=
fileName
;
const
unsigned
previousCurrentLine
=
env
.
currentLine
;
env
.
currentLine
=
0
;
...
...
@@ -716,6 +702,8 @@ void Preprocessor::preprocess(const QByteArray &source, QByteArray *result)
}
popState
();
env
.
currentFile
=
previousFileName
;
env
.
currentLine
=
previousCurrentLine
;
_result
=
previousResult
;
}
...
...
src/libs/cplusplus/pp-engine.h
View file @
2a8327e5
...
...
@@ -138,8 +138,6 @@ public:
QByteArray
operator
()(
const
QByteArray
&
filename
,
const
QByteArray
&
source
);
QByteArray
operator
()(
const
QByteArray
&
source
);
private:
enum
{
MAX_LEVEL
=
512
};
...
...
@@ -171,9 +169,6 @@ private:
const
QByteArray
&
source
,
QByteArray
*
result
);
void
preprocess
(
const
QByteArray
&
source
,
QByteArray
*
result
);
void
expand
(
const
QByteArray
&
source
,
QByteArray
*
result
);
void
expand
(
const
char
*
first
,
const
char
*
last
,
QByteArray
*
result
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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