TextEditor: Modernize

modernize-*

Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2018-11-25 18:52:41 +01:00
parent a9fa1fe5b1
commit 2e2059e8b5
62 changed files with 167 additions and 222 deletions

View File

@@ -30,9 +30,7 @@
namespace TextEditor {
CodeFormatterData::~CodeFormatterData()
{
}
CodeFormatterData::~CodeFormatterData() = default;
TextBlockUserData::~TextBlockUserData()
{
@@ -48,8 +46,8 @@ TextBlockUserData::~TextBlockUserData()
int TextBlockUserData::braceDepthDelta() const
{
int delta = 0;
for (int i = 0; i < m_parentheses.size(); ++i) {
switch (m_parentheses.at(i).chr.unicode()) {
for (auto &parenthesis : m_parentheses) {
switch (parenthesis.chr.unicode()) {
case '{': case '+': case '[': ++delta; break;
case '}': case '-': case ']': --delta; break;
default: break;