More QVector fixes.

Change-Id: I710f9c9d5391a8f1252cc02fdd263a8dfedb31f6
Reviewed-on: https://code.wireshark.org/review/24730
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2017-12-07 18:20:19 -08:00 committed by Gerald Combs
parent 683087628b
commit 847585f938
1 changed files with 2 additions and 2 deletions

View File

@ -359,7 +359,7 @@ void ByteViewText::drawLine(QPainter *painter, const int offset, const int row_y
if ((tvb_pos != offset) && ((tvb_pos % separator_interval_) == 0)) {
line += ' ';
if (build_x_pos) {
x_pos_to_column_.append(QVector<int>().fill(tvb_pos - offset - 1, font_width_ / 2));
x_pos_to_column_ += QVector<int>().fill(tvb_pos - offset - 1, font_width_ / 2);
}
}
@ -373,7 +373,7 @@ void ByteViewText::drawLine(QPainter *painter, const int offset, const int row_y
line += UTF8_MIDDLE_DOT;
}
if (build_x_pos) {
x_pos_to_column_.append(QVector<int>().fill(tvb_pos - offset, fontMetrics().width(line) - x_pos_to_column_.size()));
x_pos_to_column_ += QVector<int>().fill(tvb_pos - offset, fontMetrics().width(line) - x_pos_to_column_.size());
}
}
addAsciiFormatRange(fmt_list, proto_start_, proto_len_, offset, max_tvb_pos, ModeProtocol);