Snippets: Simplify code

Change-Id: I8e8d8fb6f01022106a818291c87970831e72db92
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Tobias Hunger
2016-11-29 17:27:42 +01:00
parent 6a16a5bae0
commit f068f59846

View File

@@ -207,7 +207,7 @@ Snippet::ParsedSnippet Snippet::parse(const QString &snippet)
const int count = preprocessedSnippet.count();
bool success = true;
int start = -1;
NameMangler *mangler = 0;
NameMangler *mangler = nullptr;
result.text.reserve(count);
@@ -234,10 +234,6 @@ Snippet::ParsedSnippet Snippet::parse(const QString &snippet)
}
if (current == QLatin1Char(':') && start >= 0) {
if (mangler != 0) {
success = false;
break;
}
if (next == QLatin1Char('l')) {
mangler = &lcMangler;
} else if (next == QLatin1Char('u')) {