Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
e0ae4021
Commit
e0ae4021
authored
May 09, 2011
by
Erik Verbruggen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed auto-test, added constant, and added a bit of doxymentation.
parent
56fea4ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
src/libs/cplusplus/findcdbbreakpoint.cpp
src/libs/cplusplus/findcdbbreakpoint.cpp
+4
-4
src/libs/cplusplus/findcdbbreakpoint.h
src/libs/cplusplus/findcdbbreakpoint.h
+10
-0
No files found.
src/libs/cplusplus/findcdbbreakpoint.cpp
View file @
e0ae4021
...
...
@@ -16,7 +16,7 @@ FindCdbBreakpoint::FindCdbBreakpoint(TranslationUnit *unit)
unsigned
FindCdbBreakpoint
::
searchFrom
(
unsigned
line
)
{
m_initialLine
=
line
;
m_breakpointLine
=
0
;
m_breakpointLine
=
NO_LINE_FOUND
;
accept
(
translationUnit
()
->
ast
());
...
...
@@ -41,7 +41,7 @@ unsigned FindCdbBreakpoint::endLine(AST *ast) const
if
(
ast
)
return
endLine
(
ast
->
lastToken
()
-
1
);
else
return
0
;
return
NO_LINE_FOUND
;
}
bool
FindCdbBreakpoint
::
preVisit
(
AST
*
ast
)
...
...
@@ -95,13 +95,13 @@ bool FindCdbBreakpoint::visit(CompoundStatementAST *ast)
bool
FindCdbBreakpoint
::
visit
(
DeclarationStatementAST
*
ast
)
{
foundLine
(
ast
->
lastToken
()
-
1
);
return
m_breakpointLine
==
0
;
return
m_breakpointLine
==
NO_LINE_FOUND
;
}
bool
FindCdbBreakpoint
::
visit
(
DoStatementAST
*
ast
)
{
accept
(
ast
->
statement
);
if
(
m_breakpointLine
==
0
)
if
(
m_breakpointLine
==
NO_LINE_FOUND
)
foundLine
(
ast
->
rparen_token
);
return
false
;
...
...
src/libs/cplusplus/findcdbbreakpoint.h
View file @
e0ae4021
...
...
@@ -9,12 +9,22 @@ namespace CPlusPlus {
class
CPLUSPLUS_EXPORT
FindCdbBreakpoint
:
protected
ASTVisitor
{
public:
static
const
unsigned
NO_LINE_FOUND
=
0
;
public:
FindCdbBreakpoint
(
TranslationUnit
*
unit
);
unsigned
operator
()(
unsigned
line
)
{
return
searchFrom
(
line
);
}
/**
* Search for the next breakable line of code.
*
* \param line the starting line from where the next breakable code line
* should be found
* \return the next breakable code line (1-based), or \c NO_LINE_FOUND if
* no line could be found.
*/
unsigned
searchFrom
(
unsigned
line
);
protected:
...
...
Write
Preview
Markdown
is supported
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