From dcb8a352dfef8224a4a5d724e51ea30d2454f6e2 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 15 Jul 2017 13:28:05 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20warning:=20unused=20variable=20=E2=80=98s?= =?UTF-8?q?elf=E2=80=99=20and=20misleading-indentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp:54: warning: unused variable ‘self’ [-Wunused-variable] bool self = false; /retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp:225: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(!IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) --- retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 6783be0a8..1135a1dda 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -63,7 +63,7 @@ GxsChannelPostItem::GxsChannelPostItem(FeedHolder *feedHolder, uint32_t feedId, void GxsChannelPostItem::init(const RsGxsMessageId& messageId,const std::set& older_versions) { QVector v; - bool self = false; + //bool self = false; for(std::set::const_iterator it(older_versions.begin());it!=older_versions.end();++it) v.push_back(*it) ; @@ -230,12 +230,12 @@ bool GxsChannelPostItem::setGroup(const RsGxsChannelGroup &group, bool doFill) mGroup = group; - // if not publisher, hide the edit button. Without the publish key, there's no way to edit a message. + // If not publisher, hide the edit button. Without the publish key, there's no way to edit a message. #ifdef DEBUG_ITEM - std::cerr << "Group subscribe flags = " << std::hex << mGroup.mMeta.mSubscribeFlags << std::dec << std::endl; + std::cerr << "Group subscribe flags = " << std::hex << mGroup.mMeta.mSubscribeFlags << std::dec << std::endl ; #endif - if(!IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) - ui->editButton->hide(); + if( !IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags) ) + ui->editButton->hide() ; if (doFill) { fill();