From d3d767ba12d88fcb8d16b9a70f95781bacb19bfc Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Tue, 3 Nov 2015 15:56:45 +0100 Subject: Make methods non-virtual that are not overridden by subclass These cases have been uncovered by Clang Analyzer as they were called during some constructor. However, there is no reason for them being virtual. They are never overridden in a derived class. Test-Information: Unit tests still pass on OS X 10.10.5. Change-Id: I90b5396a0dba971d9150c35f9107733f7f4637cd diff --git a/SwifTools/Application/ApplicationPathProvider.h b/SwifTools/Application/ApplicationPathProvider.h index 17c39dd..aba9687 100644 --- a/SwifTools/Application/ApplicationPathProvider.h +++ b/SwifTools/Application/ApplicationPathProvider.h @@ -1,14 +1,15 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include -#include #include +#include + +#include namespace Swift { class ApplicationPathProvider { @@ -18,7 +19,7 @@ namespace Swift { virtual boost::filesystem::path getHomeDir() const = 0; virtual boost::filesystem::path getDataDir() const = 0; - virtual boost::filesystem::path getExecutableDir() const; + boost::filesystem::path getExecutableDir() const; boost::filesystem::path getProfileDir(const std::string& profile) const; boost::filesystem::path getResourcePath(const std::string& resource) const; diff --git a/Swift/Controllers/Chat/ChatControllerBase.h b/Swift/Controllers/Chat/ChatControllerBase.h index 49e24e8..6c67985 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.h +++ b/Swift/Controllers/Chat/ChatControllerBase.h @@ -58,7 +58,7 @@ namespace Swift { std::string addMessage(const std::string& message, const std::string& senderName, bool senderIsSelf, boost::shared_ptr label, const boost::filesystem::path& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight); void replaceMessage(const std::string& message, const std::string& id, bool senderIsSelf, const boost::posix_time::ptime& time, const HighlightAction& highlight); virtual void setOnline(bool online); - virtual void setEnabled(bool enabled); + void setEnabled(bool enabled); virtual void setToJID(const JID& jid) {toJID_ = jid;} /** Used for determining when something is recent.*/ boost::signal onActivity; -- cgit v0.10.2-6-g49f6