From: Lukasz Wlazly Date: Mon, 23 Oct 2017 12:36:34 +0000 (+0200) Subject: Static code analysis X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F157149%2F2;p=platform%2Fcore%2Faccessibility%2Funiversal-switch.git Static code analysis Change-Id: I062963ce901c7dc9940241008930980cf26f4c24 --- diff --git a/src/NavigationInterface.cpp b/src/NavigationInterface.cpp index fe8b8624..530fd3e3 100644 --- a/src/NavigationInterface.cpp +++ b/src/NavigationInterface.cpp @@ -443,7 +443,7 @@ private: struct Elem { AtspiAccessiblePtr obj, parent; Rectangle pos; - bool hasRelation = false, isItem = false, isCollapsed = false, isDisabled = false; + bool hasRelation = false, isItem = false, isCollapsed = false; }; struct All { std::vector expandableElems, expandableAndExpandedElems; diff --git a/src/SwitchId.cpp b/src/SwitchId.cpp index cfcce3ca..4ed47e21 100644 --- a/src/SwitchId.cpp +++ b/src/SwitchId.cpp @@ -1,6 +1,6 @@ #include "SwitchId.hpp" -SwitchId::SwitchId(const std::string &localId, const std::string providerId) +SwitchId::SwitchId(const std::string &localId, const std::string &providerId) : localId(localId), providerId(providerId) {} @@ -14,11 +14,6 @@ std::string SwitchId::getGlobalId() const return providerId + "_" + localId; } -std::string SwitchId::getLocalId() const -{ - return localId; -} - std::string SwitchId::getProviderId() const { return providerId; diff --git a/src/SwitchId.hpp b/src/SwitchId.hpp index c5ae5dd2..df430595 100644 --- a/src/SwitchId.hpp +++ b/src/SwitchId.hpp @@ -6,12 +6,11 @@ class SwitchId { public: - SwitchId(const std::string &localId, const std::string providerId); + SwitchId(const std::string &localId, const std::string &providerId); bool operator==(const SwitchId &switchId) const; std::string getGlobalId() const; - std::string getLocalId() const; std::string getProviderId() const; private: diff --git a/src/SwitchInteractionManager.cpp b/src/SwitchInteractionManager.cpp index abb4d852..1031d2f1 100644 --- a/src/SwitchInteractionManager.cpp +++ b/src/SwitchInteractionManager.cpp @@ -46,21 +46,6 @@ void SwitchInteractionManager::stopInteraction(const std::shared_ptr &sw }); } -double SwitchInteractionManager::getMinimalSwitchInteractionTime() const -{ - return minimalSwitchInteractionTime; -} - -double SwitchInteractionManager::getSwitchInteractionInterval() const -{ - return switchInteractionInterval; -} - -double SwitchInteractionManager::getNotificationRepetitionInterval() const -{ - return notificationRepetitionInterval; -} - void SwitchInteractionManager::registerAndGetStateAndValueVconfData(VConfInterface::CallbackHandle &stateHandler, const std::string &stateKey, VConfInterface::CallbackHandle &valueHandler, const std::string &valueKey, double &value) { diff --git a/src/SwitchInteractionManager.hpp b/src/SwitchInteractionManager.hpp index 00c64282..d3fa8346 100644 --- a/src/SwitchInteractionManager.hpp +++ b/src/SwitchInteractionManager.hpp @@ -17,10 +17,6 @@ public: void startInteraction(const NotifyMethod &method, const std::shared_ptr &sw); void stopInteraction(const std::shared_ptr &sw); - double getMinimalSwitchInteractionTime() const; - double getSwitchInteractionInterval() const; - double getNotificationRepetitionInterval() const; - private: ecore::TimerRepetitionPolicy unconditionallyStopInteraction(); diff --git a/tests/no-ui-scenarios/DBusTests.cpp b/tests/no-ui-scenarios/DBusTests.cpp index d9e41b9b..e6b07beb 100644 --- a/tests/no-ui-scenarios/DBusTests.cpp +++ b/tests/no-ui-scenarios/DBusTests.cpp @@ -81,29 +81,6 @@ protected: ecore_main_loop_begin(); } - static void addValues(std::map &dst, std::map &s1, std::map &s2) - { - for (auto &a : s1) - dst[a.first] = a.second + s2[a.first]; - } - static void addValues(std::unordered_map &dst, std::unordered_map &s1, std::unordered_map &s2) - { - for (auto &a : s1) - dst[a.first] = a.second + s2[a.first]; - } - static void addValues(std::vector &dst, std::vector &s1, std::vector &s2) - { - dst.resize(s1.size()); - for (size_t i = 0; i < s1.size(); ++i) { - dst[i] = s1[i] + s2[i]; - } - } - template static void addValues(std::array &dst, std::array &s1, std::array &s2) - { - for (size_t i = 0; i < I; ++i) { - dst[i] = s1[i] + s2[i]; - } - } template static void compareValues(T1 src, T2 expected) { EXPECT_EQ(src.size(), expected.size()); @@ -486,7 +463,6 @@ TEST_F(DBusTest, sendAndReceiveSignal) { auto connection = getDBusConnectionByType(DBus::ConnectionType::SYSTEM); DBus::DBusInterfaceDescription dsc("itest.itest"); - std::unordered_map values; auto signalId = dsc.addSignal("ftest"); DBus::DBusServer server{connection};