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
Q
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
Tobias Hunger
qt-creator
Commits
a340cd11
Commit
a340cd11
authored
Sep 02, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the numeric literals.
parent
c12866a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+3
-0
src/shared/cplusplus/Control.cpp
src/shared/cplusplus/Control.cpp
+5
-0
src/shared/cplusplus/Control.h
src/shared/cplusplus/Control.h
+2
-0
src/shared/cplusplus/LiteralTable.h
src/shared/cplusplus/LiteralTable.h
+11
-0
No files found.
src/plugins/cpptools/cppmodelmanager.cpp
View file @
a340cd11
...
...
@@ -287,6 +287,9 @@ public:
_doc
->
check
(
_mode
);
_doc
->
releaseTranslationUnit
();
if
(
_mode
==
Document
::
FastCheck
)
_doc
->
control
()
->
squeeze
();
if
(
_modelManager
)
_modelManager
->
emitDocumentUpdated
(
_doc
);
// ### TODO: compress
}
...
...
src/shared/cplusplus/Control.cpp
View file @
a340cd11
...
...
@@ -754,3 +754,8 @@ bool Control::hasSymbol(Symbol *symbol) const
{
return
std
::
find
(
d
->
symbols
.
begin
(),
d
->
symbols
.
end
(),
symbol
)
!=
d
->
symbols
.
end
();
}
void
Control
::
squeeze
()
{
d
->
numericLiterals
.
reset
();
}
src/shared/cplusplus/Control.h
View file @
a340cd11
...
...
@@ -211,6 +211,8 @@ public:
bool
hasSymbol
(
Symbol
*
symbol
)
const
;
void
squeeze
();
private:
class
Data
;
friend
class
Data
;
...
...
src/shared/cplusplus/LiteralTable.h
View file @
a340cd11
...
...
@@ -73,6 +73,11 @@ public:
{
}
~
LiteralTable
()
{
reset
();
}
void
reset
()
{
if
(
_literals
)
{
_Literal
**
lastLiteral
=
_literals
+
_literalCount
+
1
;
...
...
@@ -82,6 +87,12 @@ public:
}
if
(
_buckets
)
std
::
free
(
_buckets
);
_literals
=
0
;
_buckets
=
0
;
_allocatedLiterals
=
0
;
_literalCount
=
-
1
;
_allocatedBuckets
=
0
;
}
bool
empty
()
const
...
...
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