From b5c503a32444bb8c2569a3f519a17bbea1f33fed Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 15 Jul 2017 13:24:07 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20warning:=20unused=20variable=20=E2=80=98p?= =?UTF-8?q?rev=5Findex=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp:535: warning: unused variable ‘prev_index’ [-Wunused-variable] uint32_t prev_index = current_index ; --- .../src/gui/gxschannels/GxsChannelPostsWidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp index 3e73e038d..56cf042a5 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidget.cpp @@ -503,13 +503,15 @@ void GxsChannelPostsWidget::insertChannelPosts(std::vector &po uint32_t current_index = new_versions[i] ; uint32_t source_index = new_versions[i] ; +#ifdef DEBUG_CHANNEL RsGxsMessageId source_msg_id = posts[source_index].mMeta.mMsgId ; +#endif // What we do is everytime we find a replacement post, we climb up the replacement graph until we find the original post // (or the most recent version of it). When we reach this post, we replace it with the data of the source post. // In the mean time, all other posts have their MsgId cleared, so that the posts are removed from the list. - std::vector versions ; + //std::vector versions ; std::map::const_iterator vit ; while(search_map.end() != (vit=search_map.find(posts[current_index].mMeta.mOrigMsgId))) @@ -521,7 +523,7 @@ void GxsChannelPostsWidget::insertChannelPosts(std::vector &po // Now replace the post only if the new versionis more recent. It may happen indeed that the same post has been corrected multiple // times. In this case, we only need to replace the post with the newest version - uint32_t prev_index = current_index ; + //uint32_t prev_index = current_index ; current_index = vit->second ; if(posts[current_index].mMeta.mMsgId.isNull()) // This handles the branching situation where this post has been already erased. No need to go down further.