aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_stream_dialog.cpp
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-08-14 10:18:51 +0200
committerRoland Knall <rknall@gmail.com>2019-08-30 13:37:25 +0000
commita53545c0c81ac71aaa10ae91d080f1640551b5b8 (patch)
tree77bf1f42dfa8d10607a05b69929f5efcaa36c6eb /ui/qt/rtp_stream_dialog.cpp
parentb43ff704446cd7a3b4c5dc3fa4268f5ebac2c326 (diff)
Qt: Add macro for g_list_next for C++
Using a simple (type *) cast on g_list_next results in a warning with modern compilers "old-style cast" Adding a warning for g_list_next and data access to avoid the warning A good overview why reinterpret_cast has been used can be found here: https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used It is a 1:1 replacement in this case, but does not use any of the new cast styles and therefore should be used with caution. Change-Id: I989f237afc39aaf40133a788b1c0bbd7a51bf974 Reviewed-on: https://code.wireshark.org/review/34284 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/rtp_stream_dialog.cpp')
-rw-r--r--ui/qt/rtp_stream_dialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp
index 519509358c..82df5debdd 100644
--- a/ui/qt/rtp_stream_dialog.cpp
+++ b/ui/qt/rtp_stream_dialog.cpp
@@ -329,13 +329,13 @@ void RtpStreamDialog::tapMarkPacket(rtpstream_tapinfo_t *tapinfo, frame_data *fd
void RtpStreamDialog::updateStreams()
{
- GList *cur_stream = g_list_nth(tapinfo_.strinfo_list, ui->streamTreeWidget->topLevelItemCount());
+ GList *cur_stream = g_list_nth(tapinfo_.strinfo_list, static_cast<guint>(ui->streamTreeWidget->topLevelItemCount()));
// Add any missing items
while (cur_stream && cur_stream->data) {
- rtpstream_info_t *stream_info = (rtpstream_info_t*) cur_stream->data;
+ rtpstream_info_t *stream_info = gxx_list_data(rtpstream_info_t*, cur_stream);
new RtpStreamTreeWidgetItem(ui->streamTreeWidget, stream_info);
- cur_stream = g_list_next(cur_stream);
+ cur_stream = gxx_list_next(cur_stream);
}
// Recalculate values