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
Marco Bubke
flatpak-qt-creator
Commits
a340cd11
Commit
a340cd11
authored
Sep 02, 2010
by
Roberto Raggi
Browse files
Get rid of the numeric literals.
parent
c12866a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
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
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