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
Marco Bubke
flatpak-qt-creator
Commits
833f097c
Commit
833f097c
authored
Aug 16, 2010
by
Roberto Raggi
Browse files
Get rid of Function::block/setBlock.
parent
5cc32e10
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Bind.cpp
View file @
833f097c
...
...
@@ -1905,7 +1905,6 @@ bool Bind::visit(FunctionDefinitionAST *ast)
if
(
CompoundStatementAST
*
c
=
ast
->
function_body
->
asCompoundStatement
())
{
if
(
c
->
symbol
)
{
fun
->
setBlock
(
c
->
symbol
);
fun
->
setEndOffset
(
c
->
symbol
->
endOffset
());
}
}
...
...
src/shared/cplusplus/Symbols.cpp
View file @
833f097c
...
...
@@ -164,7 +164,6 @@ void TypenameArgument::visitSymbol0(SymbolVisitor *visitor)
Function
::
Function
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
)
:
Scope
(
translationUnit
,
sourceLocation
,
name
),
_block
(
0
),
_flags
(
0
)
{
}
...
...
@@ -189,12 +188,6 @@ int Function::methodKey() const
void
Function
::
setMethodKey
(
int
key
)
{
f
.
_methodKey
=
key
;
}
Block
*
Function
::
block
()
const
{
return
_block
;
}
void
Function
::
setBlock
(
Block
*
block
)
{
_block
=
block
;
}
bool
Function
::
isEqualTo
(
const
Type
*
other
)
const
{
const
Function
*
o
=
other
->
asFunctionType
();
...
...
@@ -293,10 +286,10 @@ bool Function::hasReturnType() const
unsigned
Function
::
argumentCount
()
const
{
if
(
_block
)
return
member
Coun
t
(
)
-
1
;
return
memberCount
()
;
const
unsigned
c
=
memberCount
();
if
(
c
>
0
&&
member
A
t
(
c
-
1
)
->
isBlock
())
return
c
-
1
;
return
c
;
}
Symbol
*
Function
::
argumentAt
(
unsigned
index
)
const
...
...
src/shared/cplusplus/Symbols.h
View file @
833f097c
...
...
@@ -297,9 +297,6 @@ public:
int
methodKey
()
const
;
void
setMethodKey
(
int
key
);
Block
*
block
()
const
;
void
setBlock
(
Block
*
block
);
FullySpecifiedType
returnType
()
const
;
void
setReturnType
(
const
FullySpecifiedType
&
returnType
);
...
...
@@ -360,7 +357,6 @@ protected:
private:
FullySpecifiedType
_returnType
;
Block
*
_block
;
struct
Flags
{
unsigned
_isVirtual
:
1
;
unsigned
_isVariadic
:
1
;
...
...
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